diff --git a/modules/remote_bitrate_estimator/tools/bwe_rtp.cc b/modules/remote_bitrate_estimator/tools/bwe_rtp.cc index d7cdb54d92..0e435ebe68 100644 --- a/modules/remote_bitrate_estimator/tools/bwe_rtp.cc +++ b/modules/remote_bitrate_estimator/tools/bwe_rtp.cc @@ -92,7 +92,7 @@ bool ParseArgsAndSetupEstimator(int argc, fprintf(stderr, "0x%08x, ", s); } fprintf(stderr, "\n"); - if (filename.substr(filename.find_last_of(".")) == ".pcap") { + if (filename.substr(filename.find_last_of('.')) == ".pcap") { fprintf(stderr, "Opening as pcap\n"); *rtp_reader = webrtc::test::RtpFileReader::Create( webrtc::test::RtpFileReader::kPcap, filename.c_str(), diff --git a/p2p/base/port.cc b/p2p/base/port.cc index f7ba6c97a4..d6e8cdd7d2 100644 --- a/p2p/base/port.cc +++ b/p2p/base/port.cc @@ -706,7 +706,7 @@ bool Port::ParseStunUsername(const StunMessage* stun_msg, // RFRAG:LFRAG const std::string username = username_attr->GetString(); - size_t colon_pos = username.find(":"); + size_t colon_pos = username.find(':'); if (colon_pos == std::string::npos) { return false; } diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc index 210848ff8c..7b1c50a6cd 100644 --- a/pc/webrtc_sdp_unittest.cc +++ b/pc/webrtc_sdp_unittest.cc @@ -2385,7 +2385,7 @@ TEST_F(WebRtcSdpTest, SerializeSessionDescriptionWithH264) { std::string to_find = "a=fmtp:" + pt + " "; size_t fmtp_pos = message.find(to_find); ASSERT_NE(std::string::npos, fmtp_pos) << "Failed to find " << to_find; - size_t fmtp_endpos = message.find("\n", fmtp_pos); + size_t fmtp_endpos = message.find('\n', fmtp_pos); ASSERT_NE(std::string::npos, fmtp_endpos); std::string fmtp_value = message.substr(fmtp_pos, fmtp_endpos); EXPECT_NE(std::string::npos, fmtp_value.find("level-asymmetry-allowed=1")); diff --git a/rtc_base/ssl_identity.cc b/rtc_base/ssl_identity.cc index 63818c1bb9..64c0f67297 100644 --- a/rtc_base/ssl_identity.cc +++ b/rtc_base/ssl_identity.cc @@ -174,7 +174,7 @@ bool SSLIdentity::PemToDer(const std::string& pem_type, if (header == std::string::npos) { return false; } - size_t body = pem_string.find("\n", header); + size_t body = pem_string.find('\n', header); if (body == std::string::npos) { return false; } diff --git a/rtc_tools/simple_command_line_parser.cc b/rtc_tools/simple_command_line_parser.cc index c34aa90556..f363d19b12 100644 --- a/rtc_tools/simple_command_line_parser.cc +++ b/rtc_tools/simple_command_line_parser.cc @@ -26,12 +26,12 @@ void CommandLineParser::Init(int argc, char** argv) { } bool CommandLineParser::IsStandaloneFlag(std::string flag) { - return flag.find("=") == std::string::npos; + return flag.find('=') == std::string::npos; } bool CommandLineParser::IsFlagWellFormed(std::string flag) { size_t dash_pos = flag.find("--"); - size_t equal_pos = flag.find("="); + size_t equal_pos = flag.find('='); if (dash_pos != 0) { fprintf(stderr, "Wrong switch format: %s\n", flag.c_str()); fprintf(stderr, "Flag doesn't start with --\n"); @@ -52,7 +52,7 @@ bool CommandLineParser::IsFlagWellFormed(std::string flag) { std::string CommandLineParser::GetCommandLineFlagName(std::string flag) { size_t dash_pos = flag.find("--"); - size_t equal_pos = flag.find("="); + size_t equal_pos = flag.find('='); if (equal_pos == std::string::npos) { return flag.substr(dash_pos + 2); } else { @@ -61,7 +61,7 @@ std::string CommandLineParser::GetCommandLineFlagName(std::string flag) { } std::string CommandLineParser::GetCommandLineFlagValue(std::string flag) { - size_t equal_pos = flag.find("="); + size_t equal_pos = flag.find('='); if (equal_pos == std::string::npos) { return ""; } else {