From 8ce7db9ba907ad4e826c826af898e1864f25f7bb Mon Sep 17 00:00:00 2001 From: cflip Date: Mon, 19 Sep 2022 21:53:40 -0600 Subject: Add ClangTidy configuration and apply fixes --- src/HttpRequest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/HttpRequest.cpp') diff --git a/src/HttpRequest.cpp b/src/HttpRequest.cpp index d1d183e..37c85fd 100644 --- a/src/HttpRequest.cpp +++ b/src/HttpRequest.cpp @@ -11,14 +11,14 @@ HttpRequest::HttpRequest(const std::string& request_string) line = s.substr(0, pos); if (line.find("GET ") != std::string::npos) { - m_uri = s.substr(4, line.find(" ", 5) - 4); + m_uri = s.substr(4, line.find(' ', 5) - 4); std::cout << m_uri << std::endl; } // If the line contains a colon, we assume it's a header. // TODO: This may not always be the case. size_t delim_pos = 0; - if ((delim_pos = line.find(":")) != std::string::npos) { + if ((delim_pos = line.find(':')) != std::string::npos) { std::string header_key = s.substr(0, delim_pos); std::string header_value = s.substr(delim_pos + 2, s.find("\r\n") - delim_pos - 2); m_headers[header_key] = header_value; -- cgit v1.2.3