Qualify calls to beast::iequals in basic_parser.ipp

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
Damian Jarek committed 2019-06-23 16:58:15 +02:00
1 parent 50ce5f7396
commit 1a720c8354
7 files changed
+27 -18

No files matched your search

@@ -16,6 +16,7 @@
#include <boost/beast/core/buffer_traits.hpp>
#include <boost/beast/core/detail/clamp.hpp>
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/detail/string.hpp>
#include <boost/asio/buffer.hpp>
#include <algorithm>
#include <utility>
@@ -746,6 +747,7 @@ basic_parser<isRequest>::
do_field(field f,
string_view value, error_code& ec)
{
using namespace beast::detail::string_literals;
// Connection
if(f == field::connection ||
f == field::proxy_connection)
@@ -759,19 +761,19 @@ do_field(field f,
}
for(auto const& s : list)
{
if(iequals({"close", 5}, s))
if(beast::iequals("close"_sv, s))
{
f_ |= flagConnectionClose;
continue;
}
if(iequals({"keep-alive", 10}, s))
if(beast::iequals("keep-alive"_sv, s))
{
f_ |= flagConnectionKeepAlive;
continue;
}
if(iequals({"upgrade", 7}, s))
if(beast::iequals("upgrade"_sv, s))
{
f_ |= flagConnectionUpgrade;
continue;
@@ -832,9 +834,9 @@ do_field(field f,
ec = {};
auto const v = token_list{value};
auto const p = std::find_if(v.begin(), v.end(),
[&](typename token_list::value_type const& s)
[&](string_view const& s)
{
return iequals({"chunked", 7}, s);
return beast::iequals("chunked"_sv, s);
});
if(p == v.end())
return;
+5 -5
View File
@@ -577,7 +577,7 @@ insert(field name,
}
auto const last = std::prev(before);
// VFALCO is it worth comparing `field name` first?
if(! iequals(sname, last->name_string()))
if(! beast::iequals(sname, last->name_string()))
{
BOOST_ASSERT(count(sname) == 0);
set_.insert_before(before, e);
@@ -818,7 +818,7 @@ get_chunked_impl() const
{
auto const next = std::next(it);
if(next == te.end())
return iequals(*it, "chunked");
return beast::iequals(*it, "chunked");
it = next;
}
return false;
@@ -901,7 +901,7 @@ set_chunked_impl(bool value)
auto const next = std::next(itt);
if(next == te.end())
{
if(iequals(*itt, "chunked"))
if(beast::iequals(*itt, "chunked"))
return; // already set
break;
}
@@ -1001,7 +1001,7 @@ set_element(element& e)
{
auto it = set_.lower_bound(
e.name_string(), key_compare{});
if(it == set_.end() || ! iequals(
if(it == set_.end() || ! beast::iequals(
e.name_string(), it->name_string()))
{
set_.insert_before(it, e);
@@ -1017,7 +1017,7 @@ set_element(element& e)
delete_element(*it);
it = next;
if(it == set_.end() ||
! iequals(e.name_string(), it->name_string()))
! beast::iequals(e.name_string(), it->name_string()))
break;
}
set_.insert_before(it, e);
+2 -2
View File
@@ -21,7 +21,7 @@ namespace http {
string_view
to_string(verb v)
{
using beast::detail::operator "" _sv;
using namespace beast::detail::string_literals;
switch(v)
{
case verb::delete_: return "DELETE"_sv;
@@ -109,7 +109,7 @@ string_to_verb(string_view v)
UNLOCK
UNSUBSCRIBE
*/
using beast::detail::operator "" _sv;
using namespace beast::detail::string_literals;
if(v.size() < 3)
return verb::unknown;
auto c = v[0];