Explorar el Código

Merge pull request #1031 from bbarenblat/master

Handle invalid `Log::Class`
Yuri Kunde Schlesner hace 11 años
padre
commit
2e5696dba4
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/common/logging/backend.cpp

+ 2 - 1
src/common/logging/backend.cpp

@@ -66,8 +66,9 @@ const char* GetLogClassName(Class log_class) {
         ALL_LOG_CLASSES()
 #undef CLS
 #undef SUB
+        case Class::Count:
+            UNREACHABLE();
     }
-    return "Unknown";
 }
 
 const char* GetLevelName(Level log_level) {