From cc5bc6c87281a2ee1a9ecd7f39cbbd5da0716dd3 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 24 Oct 2017 10:18:32 +0200 Subject: [PATCH] Make the 'deprecated' keyword work for all field types --- tools/mkclass/classcompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkclass/classcompiler.cpp b/tools/mkclass/classcompiler.cpp index eb44de809..04e9abdeb 100644 --- a/tools/mkclass/classcompiler.cpp +++ b/tools/mkclass/classcompiler.cpp @@ -514,7 +514,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&) if (field.Type.GetRealType().find("::Ptr") != std::string::npos) m_Impl << "\t" << "if (" << argName << ")" << std::endl; else - m_Impl << "\t" << "if (!" << argName << ".IsEmpty())" << std::endl; + m_Impl << "\t" << "if (" << argName << " != GetDefault" << field.GetFriendlyName() << "())" << std::endl; m_Impl << "\t\t" << "Log(LogWarning, \"" << klass.Name << "\") << \"Attribute '" << field.Name << "' for object '\" << dynamic_cast(this)->GetName() << \"' of type '\" << dynamic_cast(this)->GetReflectionType()->GetName() << \"' is deprecated and should not be used.\";" << std::endl; }