fix lib/checkclass.cpp:51:12: warning: enumeration value ‘eLambda’ not handled in switch [-Wswitch] (#1978)

This commit is contained in:
IOBYTE 2019-07-11 02:25:25 -04:00 committed by Daniel Marjamäki
parent a9d61c4ddd
commit 9700490e51
2 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,8 @@ static const char * getFunctionTypeName(Function::Type type)
return "function"; return "function";
case Function::eOperatorEqual: case Function::eOperatorEqual:
return "operator="; return "operator=";
case Function::eLambda:
return "lambda";
} }
return ""; return "";
} }

View File

@ -2726,6 +2726,7 @@ void SymbolDatabase::printOut(const char *title) const
func->type == Function::eOperatorEqual ? "OperatorEqual" : func->type == Function::eOperatorEqual ? "OperatorEqual" :
func->type == Function::eDestructor ? "Destructor" : func->type == Function::eDestructor ? "Destructor" :
func->type == Function::eFunction ? "Function" : func->type == Function::eFunction ? "Function" :
func->type == Function::eLambda ? "Lambda" :
"Unknown") << std::endl; "Unknown") << std::endl;
std::cout << " access: " << accessControlToString(func->access) << std::endl; std::cout << " access: " << accessControlToString(func->access) << std::endl;
std::cout << " hasBody: " << func->hasBody() << std::endl; std::cout << " hasBody: " << func->hasBody() << std::endl;
@ -2985,6 +2986,7 @@ void SymbolDatabase::printXml(std::ostream &out) const
function->type == Function::eOperatorEqual ? "OperatorEqual" : function->type == Function::eOperatorEqual ? "OperatorEqual" :
function->type == Function::eDestructor ? "Destructor" : function->type == Function::eDestructor ? "Destructor" :
function->type == Function::eFunction ? "Function" : function->type == Function::eFunction ? "Function" :
function->type == Function::eLambda ? "Lambda" :
"Unknown") << '\"'; "Unknown") << '\"';
if (function->nestedIn->definedType) { if (function->nestedIn->definedType) {
if (function->hasVirtualSpecifier()) if (function->hasVirtualSpecifier())