Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
183d31cb
Commit
183d31cb
authored
Dec 16, 2016
by
Chris Kennelly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rvalue setters for non-arena strings on C++11.
parent
a95e38ce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
391 additions
and
1 deletion
+391
-1
any.pb.cc
src/google/protobuf/any.pb.cc
+16
-0
any.pb.h
src/google/protobuf/any.pb.h
+22
-0
api.pb.cc
src/google/protobuf/api.pb.cc
+56
-0
api.pb.h
src/google/protobuf/api.pb.h
+77
-0
arenastring.h
src/google/protobuf/arenastring.h
+10
-0
cpp_string_field.cc
src/google/protobuf/compiler/cpp/cpp_string_field.cc
+31
-1
cpp_unittest.cc
src/google/protobuf/compiler/cpp/cpp_unittest.cc
+46
-0
plugin.pb.cc
src/google/protobuf/compiler/plugin.pb.cc
+48
-0
plugin.pb.h
src/google/protobuf/compiler/plugin.pb.h
+66
-0
descriptor.pb.cc
src/google/protobuf/descriptor.pb.cc
+0
-0
descriptor.pb.h
src/google/protobuf/descriptor.pb.h
+0
-0
source_context.pb.cc
src/google/protobuf/source_context.pb.cc
+8
-0
source_context.pb.h
src/google/protobuf/source_context.pb.h
+11
-0
No files found.
src/google/protobuf/any.pb.cc
View file @
183d31cb
...
...
@@ -416,6 +416,14 @@ void Any::set_type_url(const ::std::string& value) {
type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
}
#if LANG_CXX11
void
Any
::
set_type_url
(
::
std
::
string
&&
value
)
{
type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
}
#endif
void
Any
::
set_type_url
(
const
char
*
value
)
{
type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -460,6 +468,14 @@ void Any::set_value(const ::std::string& value) {
value_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Any.value)
}
#if LANG_CXX11
void
Any
::
set_value
(
::
std
::
string
&&
value
)
{
value_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
}
#endif
void
Any
::
set_value
(
const
char
*
value
)
{
value_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/any.pb.h
View file @
183d31cb
...
...
@@ -127,6 +127,9 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in
static
const
int
kTypeUrlFieldNumber
=
1
;
const
::
std
::
string
&
type_url
()
const
;
void
set_type_url
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_type_url
(
::
std
::
string
&&
value
);
#endif
void
set_type_url
(
const
char
*
value
);
void
set_type_url
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_type_url
();
...
...
@@ -138,6 +141,9 @@ class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_in
static
const
int
kValueFieldNumber
=
2
;
const
::
std
::
string
&
value
()
const
;
void
set_value
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_value
(
::
std
::
string
&&
value
);
#endif
void
set_value
(
const
char
*
value
);
void
set_value
(
const
void
*
value
,
size_t
size
);
::
std
::
string
*
mutable_value
();
...
...
@@ -179,6 +185,14 @@ inline void Any::set_type_url(const ::std::string& value) {
type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
}
#if LANG_CXX11
inline
void
Any
::
set_type_url
(
::
std
::
string
&&
value
)
{
type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
}
#endif
inline
void
Any
::
set_type_url
(
const
char
*
value
)
{
type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -223,6 +237,14 @@ inline void Any::set_value(const ::std::string& value) {
value_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Any.value)
}
#if LANG_CXX11
inline
void
Any
::
set_value
(
::
std
::
string
&&
value
)
{
value_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
}
#endif
inline
void
Any
::
set_value
(
const
char
*
value
)
{
value_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/api.pb.cc
View file @
183d31cb
...
...
@@ -684,6 +684,14 @@ void Api::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Api.name)
}
#if LANG_CXX11
void
Api
::
set_name
(
::
std
::
string
&&
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.name)
}
#endif
void
Api
::
set_name
(
const
char
*
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -788,6 +796,14 @@ void Api::set_version(const ::std::string& value) {
version_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Api.version)
}
#if LANG_CXX11
void
Api
::
set_version
(
::
std
::
string
&&
value
)
{
version_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.version)
}
#endif
void
Api
::
set_version
(
const
char
*
value
)
{
version_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1408,6 +1424,14 @@ void Method::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Method.name)
}
#if LANG_CXX11
void
Method
::
set_name
(
::
std
::
string
&&
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.name)
}
#endif
void
Method
::
set_name
(
const
char
*
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1452,6 +1476,14 @@ void Method::set_request_type_url(const ::std::string& value) {
request_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url)
}
#if LANG_CXX11
void
Method
::
set_request_type_url
(
::
std
::
string
&&
value
)
{
request_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.request_type_url)
}
#endif
void
Method
::
set_request_type_url
(
const
char
*
value
)
{
request_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1510,6 +1542,14 @@ void Method::set_response_type_url(const ::std::string& value) {
response_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url)
}
#if LANG_CXX11
void
Method
::
set_response_type_url
(
::
std
::
string
&&
value
)
{
response_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.response_type_url)
}
#endif
void
Method
::
set_response_type_url
(
const
char
*
value
)
{
response_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1897,6 +1937,14 @@ void Mixin::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Mixin.name)
}
#if LANG_CXX11
void
Mixin
::
set_name
(
::
std
::
string
&&
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.name)
}
#endif
void
Mixin
::
set_name
(
const
char
*
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1941,6 +1989,14 @@ void Mixin::set_root(const ::std::string& value) {
root_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Mixin.root)
}
#if LANG_CXX11
void
Mixin
::
set_root
(
::
std
::
string
&&
value
)
{
root_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.root)
}
#endif
void
Mixin
::
set_root
(
const
char
*
value
)
{
root_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/api.pb.h
View file @
183d31cb
...
...
@@ -142,6 +142,9 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in
static
const
int
kNameFieldNumber
=
1
;
const
::
std
::
string
&
name
()
const
;
void
set_name
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_name
(
::
std
::
string
&&
value
);
#endif
void
set_name
(
const
char
*
value
);
void
set_name
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_name
();
...
...
@@ -177,6 +180,9 @@ class LIBPROTOBUF_EXPORT Api : public ::google::protobuf::Message /* @@protoc_in
static
const
int
kVersionFieldNumber
=
4
;
const
::
std
::
string
&
version
()
const
;
void
set_version
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_version
(
::
std
::
string
&&
value
);
#endif
void
set_version
(
const
char
*
value
);
void
set_version
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_version
();
...
...
@@ -301,6 +307,9 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc
static
const
int
kNameFieldNumber
=
1
;
const
::
std
::
string
&
name
()
const
;
void
set_name
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_name
(
::
std
::
string
&&
value
);
#endif
void
set_name
(
const
char
*
value
);
void
set_name
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_name
();
...
...
@@ -312,6 +321,9 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc
static
const
int
kRequestTypeUrlFieldNumber
=
2
;
const
::
std
::
string
&
request_type_url
()
const
;
void
set_request_type_url
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_request_type_url
(
::
std
::
string
&&
value
);
#endif
void
set_request_type_url
(
const
char
*
value
);
void
set_request_type_url
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_request_type_url
();
...
...
@@ -329,6 +341,9 @@ class LIBPROTOBUF_EXPORT Method : public ::google::protobuf::Message /* @@protoc
static
const
int
kResponseTypeUrlFieldNumber
=
4
;
const
::
std
::
string
&
response_type_url
()
const
;
void
set_response_type_url
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_response_type_url
(
::
std
::
string
&&
value
);
#endif
void
set_response_type_url
(
const
char
*
value
);
void
set_response_type_url
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_response_type_url
();
...
...
@@ -450,6 +465,9 @@ class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_
static
const
int
kNameFieldNumber
=
1
;
const
::
std
::
string
&
name
()
const
;
void
set_name
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_name
(
::
std
::
string
&&
value
);
#endif
void
set_name
(
const
char
*
value
);
void
set_name
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_name
();
...
...
@@ -461,6 +479,9 @@ class LIBPROTOBUF_EXPORT Mixin : public ::google::protobuf::Message /* @@protoc_
static
const
int
kRootFieldNumber
=
2
;
const
::
std
::
string
&
root
()
const
;
void
set_root
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_root
(
::
std
::
string
&&
value
);
#endif
void
set_root
(
const
char
*
value
);
void
set_root
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_root
();
...
...
@@ -501,6 +522,14 @@ inline void Api::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Api.name)
}
#if LANG_CXX11
inline
void
Api
::
set_name
(
::
std
::
string
&&
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.name)
}
#endif
inline
void
Api
::
set_name
(
const
char
*
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -605,6 +634,14 @@ inline void Api::set_version(const ::std::string& value) {
version_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Api.version)
}
#if LANG_CXX11
inline
void
Api
::
set_version
(
::
std
::
string
&&
value
)
{
version_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Api.version)
}
#endif
inline
void
Api
::
set_version
(
const
char
*
value
)
{
version_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -736,6 +773,14 @@ inline void Method::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Method.name)
}
#if LANG_CXX11
inline
void
Method
::
set_name
(
::
std
::
string
&&
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.name)
}
#endif
inline
void
Method
::
set_name
(
const
char
*
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -780,6 +825,14 @@ inline void Method::set_request_type_url(const ::std::string& value) {
request_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Method.request_type_url)
}
#if LANG_CXX11
inline
void
Method
::
set_request_type_url
(
::
std
::
string
&&
value
)
{
request_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.request_type_url)
}
#endif
inline
void
Method
::
set_request_type_url
(
const
char
*
value
)
{
request_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -838,6 +891,14 @@ inline void Method::set_response_type_url(const ::std::string& value) {
response_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Method.response_type_url)
}
#if LANG_CXX11
inline
void
Method
::
set_response_type_url
(
::
std
::
string
&&
value
)
{
response_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Method.response_type_url)
}
#endif
inline
void
Method
::
set_response_type_url
(
const
char
*
value
)
{
response_type_url_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -944,6 +1005,14 @@ inline void Mixin::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Mixin.name)
}
#if LANG_CXX11
inline
void
Mixin
::
set_name
(
::
std
::
string
&&
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.name)
}
#endif
inline
void
Mixin
::
set_name
(
const
char
*
value
)
{
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -988,6 +1057,14 @@ inline void Mixin::set_root(const ::std::string& value) {
root_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.Mixin.root)
}
#if LANG_CXX11
inline
void
Mixin
::
set_root
(
::
std
::
string
&&
value
)
{
root_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.Mixin.root)
}
#endif
inline
void
Mixin
::
set_root
(
const
char
*
value
)
{
root_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/arenastring.h
View file @
183d31cb
...
...
@@ -210,6 +210,16 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
}
}
#if LANG_CXX11
void
SetNoArena
(
const
::
std
::
string
*
default_value
,
::
std
::
string
&&
value
)
{
if
(
IsDefault
(
default_value
))
{
ptr_
=
new
::
std
::
string
(
std
::
move
(
value
));
}
else
{
*
ptr_
=
std
::
move
(
value
);
}
}
#endif
void
AssignWithDefault
(
const
::
std
::
string
*
default_value
,
ArenaStringPtr
value
);
inline
const
::
std
::
string
&
GetNoArena
()
const
{
return
*
ptr_
;
}
...
...
src/google/protobuf/compiler/cpp/cpp_string_field.cc
View file @
183d31cb
...
...
@@ -141,7 +141,16 @@ GenerateAccessorDeclarations(io::Printer* printer) const {
printer
->
Print
(
variables_
,
"$deprecated_attr$const ::std::string& $name$() const;
\n
"
"$deprecated_attr$void set_$name$(const ::std::string& value);
\n
"
"$deprecated_attr$void set_$name$(const ::std::string& value);
\n
"
);
if
(
!
SupportsArenas
(
descriptor_
))
{
printer
->
Print
(
variables_
,
"#if LANG_CXX11
\n
"
"$deprecated_attr$void set_$name$(::std::string&& value);
\n
"
"#endif
\n
"
);
}
printer
->
Print
(
variables_
,
"$deprecated_attr$void set_$name$(const char* value);
\n
"
"$deprecated_attr$void set_$name$(const $pointer_type$* value, size_t size)"
";
\n
"
...
...
@@ -249,6 +258,14 @@ GenerateInlineAccessorDefinitions(io::Printer* printer,
" $name$_.SetNoArena($default_variable$, value);
\n
"
" // @@protoc_insertion_point(field_set:$full_name$)
\n
"
"}
\n
"
"#if LANG_CXX11
\n
"
"$inline$void $classname$::set_$name$(::std::string&& value) {
\n
"
" $set_hasbit$
\n
"
" $name$_.SetNoArena(
\n
"
" $default_variable$, ::std::move(value));
\n
"
" // @@protoc_insertion_point(field_set_rvalue:$full_name$)
\n
"
"}
\n
"
"#endif
\n
"
"$inline$void $classname$::set_$name$(const char* value) {
\n
"
" $set_hasbit$
\n
"
" $name$_.SetNoArena($default_variable$, $string_piece$(value));
\n
"
...
...
@@ -633,6 +650,19 @@ GenerateInlineAccessorDefinitions(io::Printer* printer,
" $oneof_prefix$$name$_.SetNoArena($default_variable$, value);
\n
"
" // @@protoc_insertion_point(field_set:$full_name$)
\n
"
"}
\n
"
"#if LANG_CXX11
\n
"
"$inline$void $classname$::set_$name$(::std::string&& value) {
\n
"
" // @@protoc_insertion_point(field_set:$full_name$)
\n
"
" if (!has_$name$()) {
\n
"
" clear_$oneof_name$();
\n
"
" set_has_$name$();
\n
"
" $oneof_prefix$$name$_.UnsafeSetDefault($default_variable$);
\n
"
" }
\n
"
" $oneof_prefix$$name$_.SetNoArena(
\n
"
" $default_variable$, ::std::move(value));
\n
"
" // @@protoc_insertion_point(field_set_rvalue:$full_name$)
\n
"
"}
\n
"
"#endif
\n
"
"$inline$void $classname$::set_$name$(const char* value) {
\n
"
" if (!has_$name$()) {
\n
"
" clear_$oneof_name$();
\n
"
...
...
src/google/protobuf/compiler/cpp/cpp_unittest.cc
View file @
183d31cb
...
...
@@ -53,6 +53,7 @@
#include <vector>
#include <google/protobuf/unittest.pb.h>
#include <google/protobuf/unittest_no_arena.pb.h>
#include <google/protobuf/unittest_optimize_for.pb.h>
#include <google/protobuf/unittest_embed_optimize_for.pb.h>
#if !defined(GOOGLE_PROTOBUF_CMAKE_BUILD) && !defined(_MSC_VER)
...
...
@@ -420,6 +421,51 @@ TEST(GeneratedMessageTest, StringCharStarLength) {
EXPECT_EQ
(
"wx"
,
message
.
repeated_string
(
0
));
}
#if LANG_CXX11
TEST
(
GeneratedMessageTest
,
StringMove
)
{
// Verify that we trigger the move behavior on a scalar setter.
protobuf_unittest_no_arena
::
TestAllTypes
message
;
{
string
tmp
(
32
,
'a'
);
const
char
*
old_data
=
tmp
.
data
();
message
.
set_optional_string
(
std
::
move
(
tmp
));
const
char
*
new_data
=
message
.
optional_string
().
data
();
EXPECT_EQ
(
old_data
,
new_data
);
EXPECT_EQ
(
string
(
32
,
'a'
),
message
.
optional_string
());
string
tmp2
(
32
,
'b'
);
old_data
=
tmp2
.
data
();
message
.
set_optional_string
(
std
::
move
(
tmp2
));
new_data
=
message
.
optional_string
().
data
();
EXPECT_EQ
(
old_data
,
new_data
);
EXPECT_EQ
(
string
(
32
,
'b'
),
message
.
optional_string
());
}
// Verify that we trigger the move behavior on a oneof setter.
{
string
tmp
(
32
,
'a'
);
const
char
*
old_data
=
tmp
.
data
();
message
.
set_oneof_string
(
std
::
move
(
tmp
));
const
char
*
new_data
=
message
.
oneof_string
().
data
();
EXPECT_EQ
(
old_data
,
new_data
);
EXPECT_EQ
(
string
(
32
,
'a'
),
message
.
oneof_string
());
string
tmp2
(
32
,
'b'
);
old_data
=
tmp2
.
data
();
message
.
set_oneof_string
(
std
::
move
(
tmp2
));
new_data
=
message
.
oneof_string
().
data
();
EXPECT_EQ
(
old_data
,
new_data
);
EXPECT_EQ
(
string
(
32
,
'b'
),
message
.
oneof_string
());
}
}
#endif
TEST
(
GeneratedMessageTest
,
CopyFrom
)
{
unittest
::
TestAllTypes
message1
,
message2
;
...
...
src/google/protobuf/compiler/plugin.pb.cc
View file @
183d31cb
...
...
@@ -651,6 +651,14 @@ void Version::set_suffix(const ::std::string& value) {
suffix_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
}
#if LANG_CXX11
void
Version
::
set_suffix
(
::
std
::
string
&&
value
)
{
set_has_suffix
();
suffix_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix)
}
#endif
void
Version
::
set_suffix
(
const
char
*
value
)
{
set_has_suffix
();
suffix_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1158,6 +1166,14 @@ void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
parameter_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
#if LANG_CXX11
void
CodeGeneratorRequest
::
set_parameter
(
::
std
::
string
&&
value
)
{
set_has_parameter
();
parameter_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
#endif
void
CodeGeneratorRequest
::
set_parameter
(
const
char
*
value
)
{
set_has_parameter
();
parameter_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1662,6 +1678,14 @@ void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
#if LANG_CXX11
void
CodeGeneratorResponse_File
::
set_name
(
::
std
::
string
&&
value
)
{
set_has_name
();
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
#endif
void
CodeGeneratorResponse_File
::
set_name
(
const
char
*
value
)
{
set_has_name
();
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1716,6 +1740,14 @@ void CodeGeneratorResponse_File::set_insertion_point(const ::std::string& value)
insertion_point_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
#if LANG_CXX11
void
CodeGeneratorResponse_File
::
set_insertion_point
(
::
std
::
string
&&
value
)
{
set_has_insertion_point
();
insertion_point_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
#endif
void
CodeGeneratorResponse_File
::
set_insertion_point
(
const
char
*
value
)
{
set_has_insertion_point
();
insertion_point_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1770,6 +1802,14 @@ void CodeGeneratorResponse_File::set_content(const ::std::string& value) {
content_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
#if LANG_CXX11
void
CodeGeneratorResponse_File
::
set_content
(
::
std
::
string
&&
value
)
{
set_has_content
();
content_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
#endif
void
CodeGeneratorResponse_File
::
set_content
(
const
char
*
value
)
{
set_has_content
();
content_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -2117,6 +2157,14 @@ void CodeGeneratorResponse::set_error(const ::std::string& value) {
error_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
}
#if LANG_CXX11
void
CodeGeneratorResponse
::
set_error
(
::
std
::
string
&&
value
)
{
set_has_error
();
error_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error)
}
#endif
void
CodeGeneratorResponse
::
set_error
(
const
char
*
value
)
{
set_has_error
();
error_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/compiler/plugin.pb.h
View file @
183d31cb
...
...
@@ -234,6 +234,9 @@ class LIBPROTOC_EXPORT Version : public ::google::protobuf::Message /* @@protoc_
static
const
int
kSuffixFieldNumber
=
4
;
const
::
std
::
string
&
suffix
()
const
;
void
set_suffix
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_suffix
(
::
std
::
string
&&
value
);
#endif
void
set_suffix
(
const
char
*
value
);
void
set_suffix
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_suffix
();
...
...
@@ -362,6 +365,9 @@ class LIBPROTOC_EXPORT CodeGeneratorRequest : public ::google::protobuf::Message
static
const
int
kParameterFieldNumber
=
2
;
const
::
std
::
string
&
parameter
()
const
;
void
set_parameter
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_parameter
(
::
std
::
string
&&
value
);
#endif
void
set_parameter
(
const
char
*
value
);
void
set_parameter
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_parameter
();
...
...
@@ -491,6 +497,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M
static
const
int
kNameFieldNumber
=
1
;
const
::
std
::
string
&
name
()
const
;
void
set_name
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_name
(
::
std
::
string
&&
value
);
#endif
void
set_name
(
const
char
*
value
);
void
set_name
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_name
();
...
...
@@ -503,6 +512,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M
static
const
int
kInsertionPointFieldNumber
=
2
;
const
::
std
::
string
&
insertion_point
()
const
;
void
set_insertion_point
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_insertion_point
(
::
std
::
string
&&
value
);
#endif
void
set_insertion_point
(
const
char
*
value
);
void
set_insertion_point
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_insertion_point
();
...
...
@@ -515,6 +527,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse_File : public ::google::protobuf::M
static
const
int
kContentFieldNumber
=
15
;
const
::
std
::
string
&
content
()
const
;
void
set_content
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_content
(
::
std
::
string
&&
value
);
#endif
void
set_content
(
const
char
*
value
);
void
set_content
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_content
();
...
...
@@ -626,6 +641,9 @@ class LIBPROTOC_EXPORT CodeGeneratorResponse : public ::google::protobuf::Messag
static
const
int
kErrorFieldNumber
=
1
;
const
::
std
::
string
&
error
()
const
;
void
set_error
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_error
(
::
std
::
string
&&
value
);
#endif
void
set_error
(
const
char
*
value
);
void
set_error
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_error
();
...
...
@@ -763,6 +781,14 @@ inline void Version::set_suffix(const ::std::string& value) {
suffix_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.Version.suffix)
}
#if LANG_CXX11
inline
void
Version
::
set_suffix
(
::
std
::
string
&&
value
)
{
set_has_suffix
();
suffix_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.Version.suffix)
}
#endif
inline
void
Version
::
set_suffix
(
const
char
*
value
)
{
set_has_suffix
();
suffix_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -876,6 +902,14 @@ inline void CodeGeneratorRequest::set_parameter(const ::std::string& value) {
parameter_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
#if LANG_CXX11
inline
void
CodeGeneratorRequest
::
set_parameter
(
::
std
::
string
&&
value
)
{
set_has_parameter
();
parameter_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorRequest.parameter)
}
#endif
inline
void
CodeGeneratorRequest
::
set_parameter
(
const
char
*
value
)
{
set_has_parameter
();
parameter_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1009,6 +1043,14 @@ inline void CodeGeneratorResponse_File::set_name(const ::std::string& value) {
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
#if LANG_CXX11
inline
void
CodeGeneratorResponse_File
::
set_name
(
::
std
::
string
&&
value
)
{
set_has_name
();
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.name)
}
#endif
inline
void
CodeGeneratorResponse_File
::
set_name
(
const
char
*
value
)
{
set_has_name
();
name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1063,6 +1105,14 @@ inline void CodeGeneratorResponse_File::set_insertion_point(const ::std::string&
insertion_point_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
#if LANG_CXX11
inline
void
CodeGeneratorResponse_File
::
set_insertion_point
(
::
std
::
string
&&
value
)
{
set_has_insertion_point
();
insertion_point_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.insertion_point)
}
#endif
inline
void
CodeGeneratorResponse_File
::
set_insertion_point
(
const
char
*
value
)
{
set_has_insertion_point
();
insertion_point_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1117,6 +1167,14 @@ inline void CodeGeneratorResponse_File::set_content(const ::std::string& value)
content_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
#if LANG_CXX11
inline
void
CodeGeneratorResponse_File
::
set_content
(
::
std
::
string
&&
value
)
{
set_has_content
();
content_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.File.content)
}
#endif
inline
void
CodeGeneratorResponse_File
::
set_content
(
const
char
*
value
)
{
set_has_content
();
content_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
@@ -1175,6 +1233,14 @@ inline void CodeGeneratorResponse::set_error(const ::std::string& value) {
error_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.compiler.CodeGeneratorResponse.error)
}
#if LANG_CXX11
inline
void
CodeGeneratorResponse
::
set_error
(
::
std
::
string
&&
value
)
{
set_has_error
();
error_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.compiler.CodeGeneratorResponse.error)
}
#endif
inline
void
CodeGeneratorResponse
::
set_error
(
const
char
*
value
)
{
set_has_error
();
error_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/descriptor.pb.cc
View file @
183d31cb
This diff is collapsed.
Click to expand it.
src/google/protobuf/descriptor.pb.h
View file @
183d31cb
This diff is collapsed.
Click to expand it.
src/google/protobuf/source_context.pb.cc
View file @
183d31cb
...
...
@@ -358,6 +358,14 @@ void SourceContext::set_file_name(const ::std::string& value) {
file_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name)
}
#if LANG_CXX11
void
SourceContext
::
set_file_name
(
::
std
::
string
&&
value
)
{
file_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name)
}
#endif
void
SourceContext
::
set_file_name
(
const
char
*
value
)
{
file_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
src/google/protobuf/source_context.pb.h
View file @
183d31cb
...
...
@@ -116,6 +116,9 @@ class LIBPROTOBUF_EXPORT SourceContext : public ::google::protobuf::Message /* @
static
const
int
kFileNameFieldNumber
=
1
;
const
::
std
::
string
&
file_name
()
const
;
void
set_file_name
(
const
::
std
::
string
&
value
);
#if LANG_CXX11
void
set_file_name
(
::
std
::
string
&&
value
);
#endif
void
set_file_name
(
const
char
*
value
);
void
set_file_name
(
const
char
*
value
,
size_t
size
);
::
std
::
string
*
mutable_file_name
();
...
...
@@ -155,6 +158,14 @@ inline void SourceContext::set_file_name(const ::std::string& value) {
file_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
value
);
// @@protoc_insertion_point(field_set:google.protobuf.SourceContext.file_name)
}
#if LANG_CXX11
inline
void
SourceContext
::
set_file_name
(
::
std
::
string
&&
value
)
{
file_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
move
(
value
));
// @@protoc_insertion_point(field_set_rvalue:google.protobuf.SourceContext.file_name)
}
#endif
inline
void
SourceContext
::
set_file_name
(
const
char
*
value
)
{
file_name_
.
SetNoArena
(
&::
google
::
protobuf
::
internal
::
GetEmptyStringAlreadyInited
(),
::
std
::
string
(
value
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment