mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 13:14:32 +02:00
parent
ba6f64a0ec
commit
135c2b2309
@ -168,6 +168,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
|
||||
std::cout << "\t\t" << "int real_id = id - " << "TypeImpl<" << klass.Parent << ">::StaticGetFieldCount();" << std::endl
|
||||
<< "\t\t" << "if (real_id < 0) { return " << "TypeImpl<" << klass.Parent << ">::StaticGetFieldInfo(id); }" << std::endl;
|
||||
|
||||
if (klass.Fields.size() > 0) {
|
||||
std::cout << "\t\t" << "switch (";
|
||||
|
||||
if (!klass.Parent.empty())
|
||||
@ -185,8 +186,13 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo& locp)
|
||||
}
|
||||
|
||||
std::cout << "\t\t\t" << "default:" << std::endl
|
||||
<< "\t\t\t\t" << "throw std::runtime_error(\"Invalid field ID.\");" << std::endl
|
||||
<< "\t\t" << "}" << std::endl;
|
||||
<< "\t\t";
|
||||
}
|
||||
|
||||
std::cout << "\t\t" << "throw std::runtime_error(\"Invalid field ID.\");" << std::endl;
|
||||
|
||||
if (klass.Fields.size() > 0)
|
||||
std::cout << "\t\t" << "}" << std::endl;
|
||||
|
||||
std::cout << "\t" << "}" << std::endl << std::endl;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user