]> granicus.if.org Git - icinga2/commitdiff
Fix compiler warning
authorGunnar Beutner <gunnar@beutner.name>
Thu, 27 Aug 2015 12:31:24 +0000 (14:31 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Thu, 27 Aug 2015 12:31:24 +0000 (14:31 +0200)
fixes #10012

tools/mkclass/classcompiler.cpp

index 12de1cbb3f613acfa4bebad0feade9de7fb7df08..91d035869cce1efbe85bae58e107d5542dbc7210 100644 (file)
@@ -754,10 +754,9 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
                                        m_Impl << it->SetAccessor << std::endl << std::endl;
 
                                if (it->Type.IsName || !it->TrackAccessor.empty()) {
-                                       m_Impl << "\t" << "ConfigObject *dobj = dynamic_cast<ConfigObject *>(this);" << std::endl;
-
                                        if (it->Name != "active") {
-                                               m_Impl << "\t" << "if (!dobj || dobj->IsActive())" << std::endl
+                                               m_Impl << "\t" << "ConfigObject *dobj = dynamic_cast<ConfigObject *>(this);" << std::endl
+                                                      << "\t" << "if (!dobj || dobj->IsActive())" << std::endl
                                                       << "\t";
                                        }