From 9df31197549b77d8a56587775d3b77e3c0b314e4 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 25 Mar 2020 09:07:00 +1100 Subject: Replace static_cast with dynamic_cast for better type safety and adherence to C++ Core Guidelines C.146. --- src/ScintillaBase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(pdoc->GetLexInterface()); + return dynamic_cast(pdoc->GetLexInterface()); } void LexState::SetLexerModule(const LexerModule *lex) { -- cgit v1.2.3