From: Gunnar Beutner Date: Wed, 13 Apr 2016 06:58:16 +0000 (+0200) Subject: Fix compiler warning in *::NotifyActive X-Git-Tag: v2.4.5~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4686d7192e0a758990a654e413d0a3005b581a06;p=icinga2 Fix compiler warning in *::NotifyActive fixes #11577 --- diff --git a/tools/mkclass/classcompiler.cpp b/tools/mkclass/classcompiler.cpp index d0aab97a9..60ae196c7 100644 --- a/tools/mkclass/classcompiler.cpp +++ b/tools/mkclass/classcompiler.cpp @@ -935,11 +935,11 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&) << "\t" << "virtual void Notify" << it->GetFriendlyName() << "(const Value& cookie = Empty);" << std::endl; m_Impl << "void ObjectImpl<" << klass.Name << ">::Notify" << it->GetFriendlyName() << "(const Value& cookie)" << std::endl - << "{" << std::endl - << "\t" << "ConfigObject *dobj = dynamic_cast(this);" << std::endl; + << "{" << std::endl; if (it->Name != "active") { - m_Impl << "\t" << "if (!dobj || dobj->IsActive())" << std::endl + m_Impl << "\t" << "ConfigObject *dobj = dynamic_cast(this);" << std::endl + << "\t" << "if (!dobj || dobj->IsActive())" << std::endl << "\t"; }