Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type#GetLoadDependencies(): VERIFY() that only config object types are returned #10169

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions tools/mkclass/classcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,11 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
<< "\tstatic const auto deps ([] {" << std::endl;

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

m_Impl << std::endl;

for (auto& dep : klass.LoadDependencies)
m_Impl << "\t\tVERIFY(type" << dep << ");" << std::endl;

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

for (const std::string& dep : klass.LoadDependencies)
m_Impl << " type" << dep << ",";
Expand Down Expand Up @@ -1480,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
Loading