diff options
author | JoaoAJMatos <joaoafonsoj2004@gmail.com> | 2022-12-08 17:31:14 +0000 |
---|---|---|
committer | JoaoAJMatos <joaoafonsoj2004@gmail.com> | 2022-12-09 16:13:57 +0000 |
commit | 7fd3b9491b0e553aa7d60a68bda82968a79da8f5 (patch) | |
tree | 7efeb2ddc5e020ce493a0531cf9b25af4438f7c8 | |
parent | 3eaf7be6ade22c99f3c0000122e49b94de868d74 (diff) |
refactor: Deleted unreachable code in httpserver.cpp
Removed all break statements from both RequestMethodString and GetRequestMethod functions as they were unreachable
-rw-r--r-- | src/httpserver.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 1a19555f76..3531039f74 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -192,16 +192,12 @@ std::string RequestMethodString(HTTPRequest::RequestMethod m) switch (m) { case HTTPRequest::GET: return "GET"; - break; case HTTPRequest::POST: return "POST"; - break; case HTTPRequest::HEAD: return "HEAD"; - break; case HTTPRequest::PUT: return "PUT"; - break; default: return "unknown"; } @@ -626,19 +622,14 @@ HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() const switch (evhttp_request_get_command(req)) { case EVHTTP_REQ_GET: return GET; - break; case EVHTTP_REQ_POST: return POST; - break; case EVHTTP_REQ_HEAD: return HEAD; - break; case EVHTTP_REQ_PUT: return PUT; - break; default: return UNKNOWN; - break; } } |