diff options
author | Neil <nyamatongwe@gmail.com> | 2017-04-22 09:11:03 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-04-22 09:11:03 +1000 |
commit | 0801e0084a5cf87f424235d5947f5158474d5da4 (patch) | |
tree | c5e5a3be2dfd1d94dd3597cb39edadc510f0273e /src/Document.cxx | |
parent | af243dd42dabdabd15a92a295d66f721e44dd473 (diff) | |
download | scintilla-mirror-0801e0084a5cf87f424235d5947f5158474d5da4.tar.gz |
Encapsulate the LexInterface of Document.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index d7e3bf62b..b4ab37244 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -129,8 +129,6 @@ Document::Document() { perLineData[ldAnnotation] = new LineAnnotation(); cb.SetPerLine(this); - - pli = 0; } Document::~Document() { @@ -142,8 +140,6 @@ Document::~Document() { pl = nullptr; } regex.release(); - delete pli; - pli = 0; delete pcf; pcf = 0; } @@ -2124,6 +2120,14 @@ void Document::LexerChanged() { } } +LexInterface *Document::GetLexInterface() const { + return pli.get(); +} + +void Document::SetLexInterface(LexInterface *pLexInterface) { + pli.reset(pLexInterface); +} + int SCI_METHOD Document::SetLineState(Sci_Position line, int state) { const int statePrevious = static_cast<LineState *>(perLineData[ldState])->SetLineState(line, state); if (state != statePrevious) { |