aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoaoAJMatos <joaoafonsoj2004@gmail.com>2022-12-08 17:31:14 +0000
committerJoaoAJMatos <joaoafonsoj2004@gmail.com>2022-12-09 16:13:57 +0000
commit7fd3b9491b0e553aa7d60a68bda82968a79da8f5 (patch)
tree7efeb2ddc5e020ce493a0531cf9b25af4438f7c8 /src
parent3eaf7be6ade22c99f3c0000122e49b94de868d74 (diff)
refactor: Deleted unreachable code in httpserver.cpp
Removed all break statements from both RequestMethodString and GetRequestMethod functions as they were unreachable
Diffstat (limited to 'src')
-rw-r--r--src/httpserver.cpp9
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;
}
}