From 90451c3b3d26a0db92e07b8ab58ab55ba4968963 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 25 Mar 2020 09:07:00 +1100 Subject: Backport: Replace static_cast with dynamic_cast for better type safety and adherence to C++ Core Guidelines C.146. Backport of changeset 8024:5893c2efc0d8. --- 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 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(pdoc->GetLexInterface()); + return dynamic_cast(pdoc->GetLexInterface()); } void LexState::SetLexerModule(const LexerModule *lex) { -- cgit v1.2.3