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

Commit8a39fde

Browse files
committed
Use string_ref compare method for checking uri scheme
This involve some overhead (implicit conversations from char* to string, and from string to string_ref)
1 parent5a369fc commit8a39fde

File tree

1 file changed

+2
-2
lines changed
  • http/src/network/protocol/http/message/wrappers

1 file changed

+2
-2
lines changed

‎http/src/network/protocol/http/message/wrappers/port.ipp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ port_wrapper::operator boost:: uint16_t() const {
2222
if (!optional_port) {
2323
auto scheme_ = uri_.scheme();
2424
assert(scheme_);
25-
if (*scheme_ =="http") {
25+
if (scheme_->compare("http") ==0) {
2626
return80u;
27-
}elseif (*scheme_ =="https") {
27+
}elseif (scheme_->compare("https") ==0) {
2828
return443u;
2929
}
3030
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp