fix(ex05): use uppercase level specifiers

This commit is contained in:
Khaïs COLIN 2025-05-13 09:54:00 +02:00
parent fd476b2c63
commit 3fa6069da8
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
2 changed files with 8 additions and 8 deletions

View file

@ -5,10 +5,10 @@ typedef void (Harl::*HarlComplaint)(void);
int getLevelIdx(std::string level) { int getLevelIdx(std::string level) {
static const std::string levels[] = { static const std::string levels[] = {
"debug", "DEBUG",
"info", "INFO",
"warning", "WARNING",
"error", "ERROR",
}; };
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
if (level == levels[i]) if (level == levels[i])

View file

@ -4,9 +4,9 @@ int main(void) {
Harl harl; Harl harl;
harl.complain("Debug"); harl.complain("Debug");
harl.complain("debug"); harl.complain("DEBUG");
harl.complain("info"); harl.complain("INFO");
harl.complain("warning"); harl.complain("WARNING");
harl.complain("error"); harl.complain("ERROR");
return 0; return 0;
} }