Skip to content

Commit

Permalink
Type#GetLoadDependencies(): VERIFY() that only config object types ar…
Browse files Browse the repository at this point in the history
…e returned
  • Loading branch information
Al2Klimov committed Sep 20, 2024
1 parent 4b20121 commit b6517c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/mkclass/classcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)

for (auto& dep : klass.LoadDependencies)
m_Impl << "\t\tauto type" << dep << " (GetByName(\"" << dep << "\").get());" << std::endl
<< "\t\tVERIFY(type" << dep << ");" << std::endl << std::endl;
<< "\t\tVERIFY(type" << dep << ");" << std::endl
<< "\t\tVERIFY(ConfigObject::TypeInstance->IsAssignableFrom(type" << dep << "));" << std::endl << std::endl;

m_Impl << "\t\treturn std::unordered_set<Type*>{";

Expand Down Expand Up @@ -1475,6 +1476,7 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
<< "#include \"base/dependencygraph.hpp\"" << std::endl
<< "#include \"base/logger.hpp\"" << std::endl
<< "#include \"base/function.hpp\"" << std::endl
<< "#include \"base/configobject.hpp\"" << std::endl
<< "#include \"base/configtype.hpp\"" << std::endl
<< "#ifdef _MSC_VER" << std::endl
<< "#pragma warning( push )" << std::endl
Expand Down

0 comments on commit b6517c6

Please sign in to comment.