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/HttpResponse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/HttpResponse.cpp') diff --git a/src/HttpResponse.cpp b/src/HttpResponse.cpp index 2f330e5..c8afc63 100644 --- a/src/HttpResponse.cpp +++ b/src/HttpResponse.cpp @@ -9,14 +9,14 @@ void HttpResponse::add_headers_and_content(const std::string& input) size_t pos = 0; std::string s = input; std::string line; - while ((pos = s.find("\n")) != std::string::npos) { + while ((pos = s.find('\n')) != std::string::npos) { line = s.substr(0, pos + 1); if (is_parsing_headers) { 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("\n") - delim_pos - 2); + std::string header_value = s.substr(delim_pos + 2, s.find('\n') - delim_pos - 2); m_headers[header_key] = header_value; } else { is_parsing_headers = false; -- cgit v1.2.3