diff options
| author | Neil <nyamatongwe@gmail.com> | 2020-03-25 09:07:00 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2020-03-25 09:07:00 +1100 |
| commit | 90451c3b3d26a0db92e07b8ab58ab55ba4968963 (patch) | |
| tree | 03da10a3b60aa7ba50f20994bf876d36ed3ae168 /src/ScintillaBase.cxx | |
| parent | 98bb3dc9449a52d530879018c42f4e5965b2c25c (diff) | |
| download | scintilla-mirror-90451c3b3d26a0db92e07b8ab58ab55ba4968963.tar.gz | |
Backport: Replace static_cast with dynamic_cast for better type safety and adherence to
C++ Core Guidelines C.146.
Backport of changeset 8024:5893c2efc0d8.
Diffstat (limited to 'src/ScintillaBase.cxx')
| -rw-r--r-- | src/ScintillaBase.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index b538fee2e..7c708d0f1 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -617,7 +617,7 @@ LexState *ScintillaBase::DocumentLexState() { if (!pdoc->GetLexInterface()) { pdoc->SetLexInterface(new LexState(pdoc)); } - return static_cast<LexState *>(pdoc->GetLexInterface()); + return dynamic_cast<LexState *>(pdoc->GetLexInterface()); } void LexState::SetLexerModule(const LexerModule *lex) { |
