fix indent on tokenize_first function signatures
R=juberti@google.com, pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/52499004 Cr-Commit-Position: refs/heads/master@{#9198}
This commit is contained in:
@@ -974,8 +974,8 @@ bool ParseCandidate(const std::string& message, Candidate* candidate,
|
||||
std::string candidate_value;
|
||||
|
||||
// |first_line| must be in the form of "candidate:<value>".
|
||||
if (!rtc::tokenize_first(first_line, kSdpDelimiterColon,
|
||||
&attribute_candidate, &candidate_value) ||
|
||||
if (!rtc::tokenize_first(first_line, kSdpDelimiterColon, &attribute_candidate,
|
||||
&candidate_value) ||
|
||||
attribute_candidate != kAttributeCandidate) {
|
||||
if (is_raw) {
|
||||
std::ostringstream description;
|
||||
@@ -2734,10 +2734,8 @@ bool ParseSsrcAttribute(const std::string& line, SsrcInfoVec* ssrc_infos,
|
||||
// a=ssrc:<ssrc-id> <attribute>
|
||||
// a=ssrc:<ssrc-id> <attribute>:<value>
|
||||
std::string field1, field2;
|
||||
if (!rtc::tokenize_first(line.substr(kLinePrefixLength),
|
||||
kSdpDelimiterSpace,
|
||||
&field1,
|
||||
&field2)) {
|
||||
if (!rtc::tokenize_first(line.substr(kLinePrefixLength), kSdpDelimiterSpace,
|
||||
&field1, &field2)) {
|
||||
const size_t expected_fields = 2;
|
||||
return ParseFailedExpectFieldNum(line, expected_fields, error);
|
||||
}
|
||||
@@ -2754,8 +2752,7 @@ bool ParseSsrcAttribute(const std::string& line, SsrcInfoVec* ssrc_infos,
|
||||
|
||||
std::string attribute;
|
||||
std::string value;
|
||||
if (!rtc::tokenize_first(field2, kSdpDelimiterColon,
|
||||
&attribute, &value)) {
|
||||
if (!rtc::tokenize_first(field2, kSdpDelimiterColon, &attribute, &value)) {
|
||||
std::ostringstream description;
|
||||
description << "Failed to get the ssrc attribute value from " << field2
|
||||
<< ". Expected format <attribute>:<value>.";
|
||||
@@ -3026,8 +3023,8 @@ bool ParseFmtpAttributes(const std::string& line, const MediaType media_type,
|
||||
// a=fmtp:<format> <format specific parameters>
|
||||
// At least two fields, whereas the second one is any of the optional
|
||||
// parameters.
|
||||
if(!rtc::tokenize_first(line.substr(kLinePrefixLength), kSdpDelimiterSpace,
|
||||
&line_payload, &line_params)) {
|
||||
if (!rtc::tokenize_first(line.substr(kLinePrefixLength), kSdpDelimiterSpace,
|
||||
&line_payload, &line_params)) {
|
||||
ParseFailedExpectMinFieldNum(line, 2, error);
|
||||
return false;
|
||||
}
|
||||
@@ -3039,8 +3036,8 @@ bool ParseFmtpAttributes(const std::string& line, const MediaType media_type,
|
||||
}
|
||||
|
||||
int payload_type = 0;
|
||||
if (!GetPayloadTypeFromString(line_payload, payload_type_str,
|
||||
&payload_type, error)) {
|
||||
if (!GetPayloadTypeFromString(line_payload, payload_type_str, &payload_type,
|
||||
error)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3049,7 +3046,7 @@ bool ParseFmtpAttributes(const std::string& line, const MediaType media_type,
|
||||
rtc::split(line_params, kSdpDelimiterSemicolon, &fields);
|
||||
|
||||
cricket::CodecParameterMap codec_params;
|
||||
for (auto &iter : fields) {
|
||||
for (auto& iter : fields) {
|
||||
if (iter.find(kSdpDelimiterEqual) == std::string::npos) {
|
||||
// Only fmtps with equals are currently supported. Other fmtp types
|
||||
// should be ignored. Unknown fmtps do not constitute an error.
|
||||
|
@@ -1207,8 +1207,7 @@ class WebRtcSdpTest : public testing::Test {
|
||||
"a=fmtp:111 0-15,66,70\r\n"
|
||||
"a=fmtp:111 ";
|
||||
std::ostringstream os;
|
||||
os << "minptime=" << params.min_ptime
|
||||
<< "; stereo=" << params.stereo
|
||||
os << "minptime=" << params.min_ptime << "; stereo=" << params.stereo
|
||||
<< "; sprop-stereo=" << params.sprop_stereo
|
||||
<< "; useinbandfec=" << params.useinband
|
||||
<< "; maxaveragebitrate=" << params.maxaveragebitrate << "\r\n"
|
||||
@@ -2508,8 +2507,8 @@ TEST_F(WebRtcSdpTest, DeserializeVideoFmtp) {
|
||||
|
||||
// Deserialize
|
||||
SdpParseError error;
|
||||
EXPECT_TRUE(webrtc::SdpDeserialize(kSdpWithFmtpString, &jdesc_output,
|
||||
&error));
|
||||
EXPECT_TRUE(
|
||||
webrtc::SdpDeserialize(kSdpWithFmtpString, &jdesc_output, &error));
|
||||
|
||||
const ContentInfo* vc = GetFirstVideoContent(jdesc_output.description());
|
||||
ASSERT_TRUE(vc != NULL);
|
||||
|
@@ -611,8 +611,10 @@ size_t tokenize(const std::string& source, char delimiter, char start_mark,
|
||||
return tokenize_append(remain_source, delimiter, fields);
|
||||
}
|
||||
|
||||
bool tokenize_first(const std::string& source, const char delimiter,
|
||||
std::string* token, std::string* rest) {
|
||||
bool tokenize_first(const std::string& source,
|
||||
const char delimiter,
|
||||
std::string* token,
|
||||
std::string* rest) {
|
||||
// Find the first delimiter
|
||||
size_t left_pos = source.find(delimiter);
|
||||
if (left_pos == std::string::npos) {
|
||||
@@ -621,7 +623,7 @@ bool tokenize_first(const std::string& source, const char delimiter,
|
||||
|
||||
// Look for additional occurrances of delimiter.
|
||||
size_t right_pos = left_pos + 1;
|
||||
while(source[right_pos] == delimiter) {
|
||||
while (source[right_pos] == delimiter) {
|
||||
right_pos++;
|
||||
}
|
||||
|
||||
|
@@ -163,8 +163,10 @@ size_t tokenize(const std::string& source, char delimiter, char start_mark,
|
||||
// Extract the first token from source as separated by delimiter, with
|
||||
// duplicates of delimiter ignored. Return false if the delimiter could not be
|
||||
// found, otherwise return true.
|
||||
bool tokenize_first(const std::string& source, const char delimiter,
|
||||
std::string* token, std::string* rest);
|
||||
bool tokenize_first(const std::string& source,
|
||||
const char delimiter,
|
||||
std::string* token,
|
||||
std::string* rest);
|
||||
|
||||
// Safe sprintf to std::string
|
||||
//void sprintf(std::string& value, size_t maxlen, const char * format, ...)
|
||||
|
Reference in New Issue
Block a user