From 1abe55ef9844afcddcab9d862ae06118f3a2390c Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Wed, 5 Sep 2018 08:30:59 -0700 Subject: Move to clang-format-6.0 This commit moves the codebase to the lastest clang-format file from upstream, as well as clang-format-6.0. Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c Signed-off-by: Ed Tanous --- include/http_utility.hpp | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'include/http_utility.hpp') diff --git a/include/http_utility.hpp b/include/http_utility.hpp index f2d317206a..e13dfc0878 100644 --- a/include/http_utility.hpp +++ b/include/http_utility.hpp @@ -1,21 +1,27 @@ #pragma once #include -namespace http_helpers { -inline bool requestPrefersHtml(const crow::Request& req) { - boost::string_view header = req.getHeaderValue("accept"); - std::vector encodings; - // chrome currently sends 6 accepts headers, firefox sends 4. - encodings.reserve(6); - boost::split(encodings, header, boost::is_any_of(", "), - boost::token_compress_on); - for (const std::string& encoding : encodings) { - if (encoding == "text/html") { - return true; - } else if (encoding == "application/json") { - return false; +namespace http_helpers +{ +inline bool requestPrefersHtml(const crow::Request& req) +{ + boost::string_view header = req.getHeaderValue("accept"); + std::vector encodings; + // chrome currently sends 6 accepts headers, firefox sends 4. + encodings.reserve(6); + boost::split(encodings, header, boost::is_any_of(", "), + boost::token_compress_on); + for (const std::string& encoding : encodings) + { + if (encoding == "text/html") + { + return true; + } + else if (encoding == "application/json") + { + return false; + } } - } - return false; + return false; } -} // namespace http_helpers \ No newline at end of file +} // namespace http_helpers \ No newline at end of file -- cgit v1.2.3