Another gcc 5 compat fix (plus small optimization)

pull/1129/head
Jason Rhinelander 4 years ago
parent 04c618ddae
commit 63d2abbb00

@ -19,6 +19,7 @@ namespace abyss
string_view val = line.substr(1 + idx);
// to lowercase
std::string lowerHeader;
lowerHeader.reserve(header.size());
auto itr = header.begin();
while(itr != header.end())
{
@ -28,7 +29,8 @@ namespace abyss
if(ShouldProcessHeader(lowerHeader))
{
val = val.substr(val.find_first_not_of(' '));
Header.Headers.emplace(lowerHeader.c_str(), val);
// llarp::str() here for gcc 5 compat
Header.Headers.emplace(std::move(lowerHeader), llarp::str(val));
}
return true;
}

Loading…
Cancel
Save