We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 600daff commit 03870caCopy full SHA for 03870ca
boost/network/uri/uri.hpp
@@ -310,9 +310,9 @@ inline bool operator==(const uri::string_type &lhs, const uri &rhs) {
310
}
311
312
inline bool operator==(const uri &lhs, const uri::value_type *rhs) {
313
- auto rlen = strlen(rhs);
314
- auto llen = std::distance(lhs.begin(), lhs.end());
315
- if (rlen != std::abs(llen)) return false;
+ auto rlen = std::strlen(rhs);
+ size_t llen = std::labs(std::distance(lhs.begin(), lhs.end()));
+ if (rlen != llen) return false;
316
return boost::equal(lhs, boost::make_iterator_range(rhs, rhs + rlen));
317
318
0 commit comments