Skip to content

Commit 66bb803

Browse files
committed
Type#GetLoadDependencies(): VERIFY() that no nullptr is returned
1 parent 5cc034b commit 66bb803

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tools/mkclass/classcompiler.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
385385
for (const std::string& dep : klass.LoadDependencies)
386386
m_Impl << "\t\t" << "GetByName(\"" << dep << "\").get()," << std::endl;
387387

388-
m_Impl << "\t" << "});" << std::endl;
388+
m_Impl << "\t});" << std::endl << std::endl;
389+
390+
m_Impl << "\tstatic const auto v (VERIFY(deps.find(nullptr) == deps.end()));" << std::endl;
391+
m_Impl << "\t(void)v;" << std::endl << std::endl;
389392

390393
m_Impl << "\t" << "return deps;" << std::endl
391394
<< "}" << std::endl << std::endl;
@@ -1463,6 +1466,7 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
14631466
<< "#include \"base/objectlock.hpp\"" << std::endl
14641467
<< "#include \"base/utility.hpp\"" << std::endl
14651468
<< "#include \"base/convert.hpp\"" << std::endl
1469+
<< "#include \"base/debug.hpp\"" << std::endl
14661470
<< "#include \"base/dependencygraph.hpp\"" << std::endl
14671471
<< "#include \"base/logger.hpp\"" << std::endl
14681472
<< "#include \"base/function.hpp\"" << std::endl

0 commit comments

Comments
 (0)