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 | 9df31197549b77d8a56587775d3b77e3c0b314e4 (patch) | |
tree | e6b69ecffd19d2dfa2142908b9141ad643b15574 /src/ScintillaBase.cxx | |
parent | c98b190d47f6adb869305baf6ee8447de79d463e (diff) | |
download | scintilla-mirror-9df31197549b77d8a56587775d3b77e3c0b314e4.tar.gz |
Replace static_cast with dynamic_cast for better type safety and adherence to
C++ Core Guidelines C.146.
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 055d61f91..9086f2976 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -622,7 +622,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) { |