diff options
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 238299734..b2a15a286 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -550,13 +550,8 @@ namespace Scintilla::Internal { class LexState : public LexInterface { public: explicit LexState(Document *pdoc_) noexcept; - void SetInstance(ILexer5 *instance_); - // Deleted so LexState objects can not be copied. - LexState(const LexState &) = delete; - LexState(LexState &&) = delete; - LexState &operator=(const LexState &) = delete; - LexState &operator=(LexState &&) = delete; - ~LexState() override; + + // LexInterface deleted the standard operators and defined the virtual destructor so don't need to here. const char *DescribeWordListSets(); void SetWordList(int n, const char *wl); @@ -592,30 +587,6 @@ public: LexState::LexState(Document *pdoc_) noexcept : LexInterface(pdoc_) { } -LexState::~LexState() { - if (instance) { - try { - instance->Release(); - } catch (...) { - // ILexer5::Release must not throw, ignore if it does. - } - instance = nullptr; - } -} - -void LexState::SetInstance(ILexer5 *instance_) { - if (instance) { - try { - instance->Release(); - } catch (...) { - // ILexer5::Release must not throw, ignore if it does. - } - instance = nullptr; - } - instance = instance_; - pdoc->LexerChanged(); -} - LexState *ScintillaBase::DocumentLexState() { if (!pdoc->GetLexInterface()) { pdoc->SetLexInterface(std::make_unique<LexState>(pdoc)); |