Skip to content

Commit

Permalink
make clang18 happy about case/switch/default
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeplf committed Oct 8, 2024
1 parent 1c28eac commit 8f02bb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/warning_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ std::string errorLink(const std::string& uri,
return "warning";
case ErrorLevel::ERROR:
return "error";
default:
throw std::runtime_error("Unknown ErrorLevel");
}
throw std::runtime_error("Unknown ErrorLevel");
};

auto COLOR = [](ErrorLevel el) {
Expand All @@ -30,8 +31,9 @@ std::string errorLink(const std::string& uri,
return "\033[1;33m";
case ErrorLevel::ERROR:
return "\033[1;31m";
default:
throw std::runtime_error("Unknown ErrorLevel");
}
throw std::runtime_error("Unknown ErrorLevel");
};

const std::string COLOR_END("\033[0m");
Expand Down

0 comments on commit 8f02bb3

Please sign in to comment.