aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/descriptor.pb.cc
diff options
context:
space:
mode:
authorChris Kennelly <ckennelly@google.com>2017-01-31 12:27:32 -0800
committerChris Kennelly <ckennelly@google.com>2017-02-15 11:41:46 -0800
commit8af35f28f696b5fa70ec7cfb64111f87b45d55b7 (patch)
tree5033fde1e05faf51ef753d304a91f753c8530e69 /src/google/protobuf/descriptor.pb.cc
parenta6c30d97054bbd6d591e471da112c5dfef501bb4 (diff)
downloadprotobuf-8af35f28f696b5fa70ec7cfb64111f87b45d55b7.tar.gz
protobuf-8af35f28f696b5fa70ec7cfb64111f87b45d55b7.tar.bz2
protobuf-8af35f28f696b5fa70ec7cfb64111f87b45d55b7.zip
Keep loop bounds in a local variable for string fields.
Diffstat (limited to 'src/google/protobuf/descriptor.pb.cc')
-rw-r--r--src/google/protobuf/descriptor.pb.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc
index 59777b11..15c97d0b 100644
--- a/src/google/protobuf/descriptor.pb.cc
+++ b/src/google/protobuf/descriptor.pb.cc
@@ -1576,7 +1576,7 @@ void FileDescriptorProto::SerializeWithCachedSizes(
}
// repeated string dependency = 3;
- for (int i = 0; i < this->dependency_size(); i++) {
+ for (int i = 0, n = this->dependency_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->dependency(i).data(), this->dependency(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
@@ -1677,7 +1677,7 @@ void FileDescriptorProto::SerializeWithCachedSizes(
}
// repeated string dependency = 3;
- for (int i = 0; i < this->dependency_size(); i++) {
+ for (int i = 0, n = this->dependency_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->dependency(i).data(), this->dependency(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
@@ -1771,7 +1771,7 @@ size_t FileDescriptorProto::ByteSizeLong() const {
// repeated string dependency = 3;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->dependency_size());
- for (int i = 0; i < this->dependency_size(); i++) {
+ for (int i = 0, n = this->dependency_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->dependency(i));
}
@@ -3511,7 +3511,7 @@ void DescriptorProto::SerializeWithCachedSizes(
}
// repeated string reserved_name = 10;
- for (int i = 0; i < this->reserved_name_size(); i++) {
+ for (int i = 0, n = this->reserved_name_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->reserved_name(i).data(), this->reserved_name(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
@@ -3599,7 +3599,7 @@ void DescriptorProto::SerializeWithCachedSizes(
}
// repeated string reserved_name = 10;
- for (int i = 0; i < this->reserved_name_size(); i++) {
+ for (int i = 0, n = this->reserved_name_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->reserved_name(i).data(), this->reserved_name(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
@@ -3705,7 +3705,7 @@ size_t DescriptorProto::ByteSizeLong() const {
// repeated string reserved_name = 10;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->reserved_name_size());
- for (int i = 0; i < this->reserved_name_size(); i++) {
+ for (int i = 0, n = this->reserved_name_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->reserved_name(i));
}
@@ -14137,7 +14137,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes(
}
// repeated string leading_detached_comments = 6;
- for (int i = 0; i < this->leading_detached_comments_size(); i++) {
+ for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
@@ -14208,7 +14208,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes(
}
// repeated string leading_detached_comments = 6;
- for (int i = 0; i < this->leading_detached_comments_size(); i++) {
+ for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->leading_detached_comments(i).data(), this->leading_detached_comments(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE,
@@ -14267,7 +14267,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const {
// repeated string leading_detached_comments = 6;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->leading_detached_comments_size());
- for (int i = 0; i < this->leading_detached_comments_size(); i++) {
+ for (int i = 0, n = this->leading_detached_comments_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->leading_detached_comments(i));
}