aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/wire_format_lite.cc
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2016-03-30 11:39:59 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2016-03-30 11:39:59 -0700
commit3b3c8abb9635eb3ea078a821a99c9ef29d66dff7 (patch)
tree7d2ec154f15c9f9153d890e76b6cf30e471ea488 /src/google/protobuf/wire_format_lite.cc
parent78105897a8f01c7be9cf8502b6c58d47eb1ccdd7 (diff)
Integrate google internal changes.
Diffstat (limited to 'src/google/protobuf/wire_format_lite.cc')
-rw-r--r--src/google/protobuf/wire_format_lite.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/google/protobuf/wire_format_lite.cc b/src/google/protobuf/wire_format_lite.cc
index 7f1093c8..f2517074 100644
--- a/src/google/protobuf/wire_format_lite.cc
+++ b/src/google/protobuf/wire_format_lite.cc
@@ -412,7 +412,7 @@ void WireFormatLite::WriteString(int field_number, const string& value,
io::CodedOutputStream* output) {
// String is for UTF-8 text only
WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output);
- GOOGLE_CHECK(value.size() <= kint32max);
+ GOOGLE_CHECK_LE(value.size(), kint32max);
output->WriteVarint32(value.size());
output->WriteString(value);
}
@@ -421,14 +421,14 @@ void WireFormatLite::WriteStringMaybeAliased(
io::CodedOutputStream* output) {
// String is for UTF-8 text only
WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output);
- GOOGLE_CHECK(value.size() <= kint32max);
+ GOOGLE_CHECK_LE(value.size(), kint32max);
output->WriteVarint32(value.size());
output->WriteRawMaybeAliased(value.data(), value.size());
}
void WireFormatLite::WriteBytes(int field_number, const string& value,
io::CodedOutputStream* output) {
WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output);
- GOOGLE_CHECK(value.size() <= kint32max);
+ GOOGLE_CHECK_LE(value.size(), kint32max);
output->WriteVarint32(value.size());
output->WriteString(value);
}
@@ -436,7 +436,7 @@ void WireFormatLite::WriteBytesMaybeAliased(
int field_number, const string& value,
io::CodedOutputStream* output) {
WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output);
- GOOGLE_CHECK(value.size() <= kint32max);
+ GOOGLE_CHECK_LE(value.size(), kint32max);
output->WriteVarint32(value.size());
output->WriteRawMaybeAliased(value.data(), value.size());
}