string const Debug::description(Debug::Type val)
{
- for (int i = 0 ; i < numErrorTags ; ++i) {
- if (errorTags[i].level == val)
- return errorTags[i].desc;
+ for (const auto & errorTag : errorTags) {
+ if (errorTag.level == val)
+ return errorTag.desc;
}
return "unknown level";
}
string const Debug::name(Debug::Type val)
{
- for (int i = 0 ; i < numErrorTags ; ++i) {
- if (errorTags[i].level == val)
- return errorTags[i].name;
+ for (const auto & errorTag : errorTags) {
+ if (errorTag.level == val)
+ return errorTag.name;
}
return "unknown level";
}