From 8f5c560e11a9f3c7c5877f444caa605bdc296e81 Mon Sep 17 00:00:00 2001 From: JoaoAJMatos Date: Thu, 8 Dec 2022 17:40:02 +0000 Subject: [PATCH] refactor: Refactored RequestMethodString function to follow developer notes Removed the default case in the switch statement in order to comply with the Developer Notes --- src/httpserver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 3531039f74..6f84d5c83b 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -198,9 +198,10 @@ std::string RequestMethodString(HTTPRequest::RequestMethod m) return "HEAD"; case HTTPRequest::PUT: return "PUT"; - default: + case HTTPRequest::UNKNOWN: return "unknown"; - } + } // no default case, so the compiler can warn about missing cases + assert(false); } /** HTTP request callback */