Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc

Issue 164743002: Replace kEmptyString with OnceInit initialized string* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
index 88559b8fcafe97f53e1b85bc980b23b5401946a8..8dcc6042686801de15f995885b244f33e938a66a 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc
@@ -184,7 +184,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
void CodeGeneratorRequest::SharedCtor() {
_cached_size_ = 0;
- parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -193,7 +193,7 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
}
void CodeGeneratorRequest::SharedDtor() {
- if (parameter_ != &::google::protobuf::internal::kEmptyString) {
+ if (parameter_ != &::google::protobuf::internal::GetEmptyString()) {
delete parameter_;
}
if (this != default_instance_) {
@@ -224,7 +224,7 @@ CodeGeneratorRequest* CodeGeneratorRequest::New() const {
void CodeGeneratorRequest::Clear() {
if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
if (has_parameter()) {
- if (parameter_ != &::google::protobuf::internal::kEmptyString) {
+ if (parameter_ != &::google::protobuf::internal::GetEmptyString()) {
parameter_->clear();
}
}
@@ -501,9 +501,9 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
void CodeGeneratorResponse_File::SharedCtor() {
_cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
- insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
- content_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
+ insertion_point_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
+ content_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -512,13 +512,13 @@ CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
}
void CodeGeneratorResponse_File::SharedDtor() {
- if (name_ != &::google::protobuf::internal::kEmptyString) {
+ if (name_ != &::google::protobuf::internal::GetEmptyString()) {
delete name_;
}
- if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
+ if (insertion_point_ != &::google::protobuf::internal::GetEmptyString()) {
delete insertion_point_;
}
- if (content_ != &::google::protobuf::internal::kEmptyString) {
+ if (content_ != &::google::protobuf::internal::GetEmptyString()) {
delete content_;
}
if (this != default_instance_) {
@@ -549,17 +549,17 @@ CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const {
void CodeGeneratorResponse_File::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
- if (name_ != &::google::protobuf::internal::kEmptyString) {
+ if (name_ != &::google::protobuf::internal::GetEmptyString()) {
name_->clear();
}
}
if (has_insertion_point()) {
- if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
+ if (insertion_point_ != &::google::protobuf::internal::GetEmptyString()) {
insertion_point_->clear();
}
}
if (has_content()) {
- if (content_ != &::google::protobuf::internal::kEmptyString) {
+ if (content_ != &::google::protobuf::internal::GetEmptyString()) {
content_->clear();
}
}
@@ -839,7 +839,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
void CodeGeneratorResponse::SharedCtor() {
_cached_size_ = 0;
- error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -848,7 +848,7 @@ CodeGeneratorResponse::~CodeGeneratorResponse() {
}
void CodeGeneratorResponse::SharedDtor() {
- if (error_ != &::google::protobuf::internal::kEmptyString) {
+ if (error_ != &::google::protobuf::internal::GetEmptyString()) {
delete error_;
}
if (this != default_instance_) {
@@ -879,7 +879,7 @@ CodeGeneratorResponse* CodeGeneratorResponse::New() const {
void CodeGeneratorResponse::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_error()) {
- if (error_ != &::google::protobuf::internal::kEmptyString) {
+ if (error_ != &::google::protobuf::internal::GetEmptyString()) {
error_->clear();
}
}
« no previous file with comments | « third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h ('k') | third_party/protobuf/src/google/protobuf/descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698