Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03870ca

Browse files
committed
Force use of size_t in distance calculation
1 parent600daff commit03870ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎boost/network/uri/uri.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ inline bool operator==(const uri::string_type &lhs, const uri &rhs) {
310310
}
311311

312312
inlinebooloperator==(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))returnfalse;
313+
auto rlen =std::strlen(rhs);
314+
size_t llen =std::labs(std::distance(lhs.begin(), lhs.end()));
315+
if (rlen != llen)returnfalse;
316316
returnboost::equal(lhs,boost::make_iterator_range(rhs, rhs + rlen));
317317
}
318318

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp