Skip to content

Commit

Permalink
Type#GetLoadDependencies(): VERIFY() that no nullptr is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
Al2Klimov committed Sep 16, 2024
1 parent 5cc034b commit 66bb803
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/mkclass/classcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,10 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
for (const std::string& dep : klass.LoadDependencies)
m_Impl << "\t\t" << "GetByName(\"" << dep << "\").get()," << std::endl;

m_Impl << "\t" << "});" << std::endl;
m_Impl << "\t});" << std::endl << std::endl;

m_Impl << "\tstatic const auto v (VERIFY(deps.find(nullptr) == deps.end()));" << std::endl;
m_Impl << "\t(void)v;" << std::endl << std::endl;

m_Impl << "\t" << "return deps;" << std::endl
<< "}" << std::endl << std::endl;
Expand Down Expand Up @@ -1463,6 +1466,7 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
<< "#include \"base/objectlock.hpp\"" << std::endl
<< "#include \"base/utility.hpp\"" << std::endl
<< "#include \"base/convert.hpp\"" << std::endl
<< "#include \"base/debug.hpp\"" << std::endl
<< "#include \"base/dependencygraph.hpp\"" << std::endl
<< "#include \"base/logger.hpp\"" << std::endl
<< "#include \"base/function.hpp\"" << std::endl
Expand Down

0 comments on commit 66bb803

Please sign in to comment.