aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/plugin.pb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/plugin.pb.cc')
-rw-r--r--src/google/protobuf/compiler/plugin.pb.cc75
1 files changed, 35 insertions, 40 deletions
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc
index 13d35c68..ad4b4deb 100644
--- a/src/google/protobuf/compiler/plugin.pb.cc
+++ b/src/google/protobuf/compiler/plugin.pb.cc
@@ -158,7 +158,6 @@ struct StaticDescriptorInitializer_google_2fprotobuf_2fcompiler_2fplugin_2eproto
// ===================================================================
-const ::std::string CodeGeneratorRequest::_default_parameter_;
#ifndef _MSC_VER
const int CodeGeneratorRequest::kFileToGenerateFieldNumber;
const int CodeGeneratorRequest::kParameterFieldNumber;
@@ -181,7 +180,7 @@ CodeGeneratorRequest::CodeGeneratorRequest(const CodeGeneratorRequest& from)
void CodeGeneratorRequest::SharedCtor() {
_cached_size_ = 0;
- parameter_ = const_cast< ::std::string*>(&_default_parameter_);
+ parameter_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -190,7 +189,7 @@ CodeGeneratorRequest::~CodeGeneratorRequest() {
}
void CodeGeneratorRequest::SharedDtor() {
- if (parameter_ != &_default_parameter_) {
+ if (parameter_ != &::google::protobuf::internal::kEmptyString) {
delete parameter_;
}
if (this != default_instance_) {
@@ -219,8 +218,8 @@ CodeGeneratorRequest* CodeGeneratorRequest::New() const {
void CodeGeneratorRequest::Clear() {
if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- if (_has_bit(1)) {
- if (parameter_ != &_default_parameter_) {
+ if (has_parameter()) {
+ if (parameter_ != &::google::protobuf::internal::kEmptyString) {
parameter_->clear();
}
}
@@ -315,7 +314,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
}
// optional string parameter = 2;
- if (_has_bit(1)) {
+ if (has_parameter()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->parameter().data(), this->parameter().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -347,7 +346,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes(
}
// optional string parameter = 2;
- if (_has_bit(1)) {
+ if (has_parameter()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->parameter().data(), this->parameter().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -425,7 +424,7 @@ void CodeGeneratorRequest::MergeFrom(const CodeGeneratorRequest& from) {
file_to_generate_.MergeFrom(from.file_to_generate_);
proto_file_.MergeFrom(from.proto_file_);
if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- if (from._has_bit(1)) {
+ if (from.has_parameter()) {
set_parameter(from.parameter());
}
}
@@ -474,9 +473,6 @@ void CodeGeneratorRequest::Swap(CodeGeneratorRequest* other) {
// ===================================================================
-const ::std::string CodeGeneratorResponse_File::_default_name_;
-const ::std::string CodeGeneratorResponse_File::_default_insertion_point_;
-const ::std::string CodeGeneratorResponse_File::_default_content_;
#ifndef _MSC_VER
const int CodeGeneratorResponse_File::kNameFieldNumber;
const int CodeGeneratorResponse_File::kInsertionPointFieldNumber;
@@ -499,9 +495,9 @@ CodeGeneratorResponse_File::CodeGeneratorResponse_File(const CodeGeneratorRespon
void CodeGeneratorResponse_File::SharedCtor() {
_cached_size_ = 0;
- name_ = const_cast< ::std::string*>(&_default_name_);
- insertion_point_ = const_cast< ::std::string*>(&_default_insertion_point_);
- content_ = const_cast< ::std::string*>(&_default_content_);
+ 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);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -510,13 +506,13 @@ CodeGeneratorResponse_File::~CodeGeneratorResponse_File() {
}
void CodeGeneratorResponse_File::SharedDtor() {
- if (name_ != &_default_name_) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
- if (insertion_point_ != &_default_insertion_point_) {
+ if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
delete insertion_point_;
}
- if (content_ != &_default_content_) {
+ if (content_ != &::google::protobuf::internal::kEmptyString) {
delete content_;
}
if (this != default_instance_) {
@@ -545,18 +541,18 @@ CodeGeneratorResponse_File* CodeGeneratorResponse_File::New() const {
void CodeGeneratorResponse_File::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (_has_bit(0)) {
- if (name_ != &_default_name_) {
+ if (has_name()) {
+ if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
- if (_has_bit(1)) {
- if (insertion_point_ != &_default_insertion_point_) {
+ if (has_insertion_point()) {
+ if (insertion_point_ != &::google::protobuf::internal::kEmptyString) {
insertion_point_->clear();
}
}
- if (_has_bit(2)) {
- if (content_ != &_default_content_) {
+ if (has_content()) {
+ if (content_ != &::google::protobuf::internal::kEmptyString) {
content_->clear();
}
}
@@ -640,7 +636,7 @@ bool CodeGeneratorResponse_File::MergePartialFromCodedStream(
void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string name = 1;
- if (_has_bit(0)) {
+ if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -649,7 +645,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
}
// optional string insertion_point = 2;
- if (_has_bit(1)) {
+ if (has_insertion_point()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->insertion_point().data(), this->insertion_point().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -658,7 +654,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
}
// optional string content = 15;
- if (_has_bit(2)) {
+ if (has_content()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->content().data(), this->content().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -675,7 +671,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
::google::protobuf::uint8* CodeGeneratorResponse_File::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
- if (_has_bit(0)) {
+ if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -685,7 +681,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
}
// optional string insertion_point = 2;
- if (_has_bit(1)) {
+ if (has_insertion_point()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->insertion_point().data(), this->insertion_point().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -695,7 +691,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes(
}
// optional string content = 15;
- if (_has_bit(2)) {
+ if (has_content()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->content().data(), this->content().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -763,13 +759,13 @@ void CodeGeneratorResponse_File::MergeFrom(const ::google::protobuf::Message& fr
void CodeGeneratorResponse_File::MergeFrom(const CodeGeneratorResponse_File& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from._has_bit(0)) {
+ if (from.has_name()) {
set_name(from.name());
}
- if (from._has_bit(1)) {
+ if (from.has_insertion_point()) {
set_insertion_point(from.insertion_point());
}
- if (from._has_bit(2)) {
+ if (from.has_content()) {
set_content(from.content());
}
}
@@ -815,7 +811,6 @@ void CodeGeneratorResponse_File::Swap(CodeGeneratorResponse_File* other) {
// -------------------------------------------------------------------
-const ::std::string CodeGeneratorResponse::_default_error_;
#ifndef _MSC_VER
const int CodeGeneratorResponse::kErrorFieldNumber;
const int CodeGeneratorResponse::kFileFieldNumber;
@@ -837,7 +832,7 @@ CodeGeneratorResponse::CodeGeneratorResponse(const CodeGeneratorResponse& from)
void CodeGeneratorResponse::SharedCtor() {
_cached_size_ = 0;
- error_ = const_cast< ::std::string*>(&_default_error_);
+ error_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -846,7 +841,7 @@ CodeGeneratorResponse::~CodeGeneratorResponse() {
}
void CodeGeneratorResponse::SharedDtor() {
- if (error_ != &_default_error_) {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
delete error_;
}
if (this != default_instance_) {
@@ -875,8 +870,8 @@ CodeGeneratorResponse* CodeGeneratorResponse::New() const {
void CodeGeneratorResponse::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (_has_bit(0)) {
- if (error_ != &_default_error_) {
+ if (has_error()) {
+ if (error_ != &::google::protobuf::internal::kEmptyString) {
error_->clear();
}
}
@@ -942,7 +937,7 @@ bool CodeGeneratorResponse::MergePartialFromCodedStream(
void CodeGeneratorResponse::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string error = 1;
- if (_has_bit(0)) {
+ if (has_error()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->error().data(), this->error().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -965,7 +960,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes(
::google::protobuf::uint8* CodeGeneratorResponse::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string error = 1;
- if (_has_bit(0)) {
+ if (has_error()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->error().data(), this->error().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
@@ -1035,7 +1030,7 @@ void CodeGeneratorResponse::MergeFrom(const CodeGeneratorResponse& from) {
GOOGLE_CHECK_NE(&from, this);
file_.MergeFrom(from.file_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from._has_bit(0)) {
+ if (from.has_error()) {
set_error(from.error());
}
}