aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/struct.pb.cc
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2017-07-18 16:26:16 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2017-07-18 16:26:16 -0700
commit3af881c7e2db0553207876acbdb91c6e77974e44 (patch)
tree35e2a96cce802d4235bd29afa396e28ead892fa2 /src/google/protobuf/struct.pb.cc
parent86975301f1876ce1934612777b8ca6c76520f5cc (diff)
parent942a29cecd36f2a4b22fdd2179635cd548e6bd27 (diff)
Merge master into 3.4.x
Diffstat (limited to 'src/google/protobuf/struct.pb.cc')
-rw-r--r--src/google/protobuf/struct.pb.cc42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/google/protobuf/struct.pb.cc b/src/google/protobuf/struct.pb.cc
index bb33a553..08029a46 100644
--- a/src/google/protobuf/struct.pb.cc
+++ b/src/google/protobuf/struct.pb.cc
@@ -331,7 +331,7 @@ bool Struct::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, &parser));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- parser.key().data(), parser.key().length(),
+ parser.key().data(), static_cast<int>(parser.key().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Struct.FieldsEntry.key"));
} else {
@@ -375,7 +375,7 @@ void Struct::SerializeWithCachedSizes(
struct Utf8Check {
static void Check(ConstPtr p) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), p->first.length(),
+ p->first.data(), static_cast<int>(p->first.length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
}
@@ -390,19 +390,19 @@ void Struct::SerializeWithCachedSizes(
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it, ++n) {
- items[n] = SortItem(&*it);
+ items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
- ::std::sort(&items[0], &items[n], Less());
+ ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
- items[i]->first, items[i]->second));
+ items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *entry, output);
if (entry->GetArena() != NULL) {
entry.release();
}
- Utf8Check::Check(items[i]);
+ Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
@@ -443,7 +443,7 @@ void Struct::SerializeWithCachedSizes(
struct Utf8Check {
static void Check(ConstPtr p) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), p->first.length(),
+ p->first.data(), static_cast<int>(p->first.length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Struct.FieldsEntry.key");
}
@@ -458,13 +458,13 @@ void Struct::SerializeWithCachedSizes(
for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
it = this->fields().begin();
it != this->fields().end(); ++it, ++n) {
- items[n] = SortItem(&*it);
+ items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
- ::std::sort(&items[0], &items[n], Less());
+ ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
for (size_type i = 0; i < n; i++) {
entry.reset(fields_.NewEntryWrapper(
- items[i]->first, items[i]->second));
+ items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
1, *entry, deterministic, target);
@@ -472,7 +472,7 @@ void Struct::SerializeWithCachedSizes(
if (entry->GetArena() != NULL) {
entry.release();
}
- Utf8Check::Check(items[i]);
+ Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
}
} else {
::google::protobuf::scoped_ptr<Struct_FieldsEntry> entry;
@@ -843,7 +843,7 @@ bool Value::MergePartialFromCodedStream(
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_string_value()));
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), this->string_value().length(),
+ this->string_value().data(), static_cast<int>(this->string_value().length()),
::google::protobuf::internal::WireFormatLite::PARSE,
"google.protobuf.Value.string_value"));
} else {
@@ -931,7 +931,7 @@ void Value::SerializeWithCachedSizes(
// string string_value = 3;
if (has_string_value()) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), this->string_value().length(),
+ this->string_value().data(), static_cast<int>(this->string_value().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Value.string_value");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
@@ -982,7 +982,7 @@ void Value::SerializeWithCachedSizes(
// string string_value = 3;
if (has_string_value()) {
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), this->string_value().length(),
+ this->string_value().data(), static_cast<int>(this->string_value().length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE,
"google.protobuf.Value.string_value");
target =
@@ -1712,9 +1712,10 @@ void ListValue::SerializeWithCachedSizes(
(void) cached_has_bits;
// repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0, n = this->values_size(); i < n; i++) {
+ for (unsigned int i = 0,
+ n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->values(i), output);
+ 1, this->values(static_cast<int>(i)), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1731,10 +1732,11 @@ void ListValue::SerializeWithCachedSizes(
(void) cached_has_bits;
// repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0, n = this->values_size(); i < n; i++) {
+ for (unsigned int i = 0,
+ n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageNoVirtualToArray(
- 1, this->values(i), deterministic, target);
+ 1, this->values(static_cast<int>(i)), deterministic, target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1756,12 +1758,12 @@ size_t ListValue::ByteSizeLong() const {
}
// repeated .google.protobuf.Value values = 1;
{
- unsigned int count = this->values_size();
+ unsigned int count = static_cast<unsigned int>(this->values_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->values(i));
+ this->values(static_cast<int>(i)));
}
}