|
|
|
@ -67,27 +67,27 @@ class PROTOBUF_EXPORT InlinedStringField { |
|
|
|
|
const InlinedStringField& from) PROTOBUF_ALWAYS_INLINE; |
|
|
|
|
|
|
|
|
|
void ClearToEmpty(const ::std::string* default_value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
ClearToEmptyNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
void ClearNonDefaultToEmpty() PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
ClearNonDefaultToEmptyNoArena(); |
|
|
|
|
} |
|
|
|
|
void ClearToEmptyNoArena(const ::std::string* default_value) |
|
|
|
|
void ClearToEmptyNoArena(const ::std::string* /*default_value*/) |
|
|
|
|
PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
ClearNonDefaultToEmptyNoArena(); |
|
|
|
|
} |
|
|
|
|
void ClearNonDefaultToEmptyNoArena() PROTOBUF_ALWAYS_INLINE; |
|
|
|
|
|
|
|
|
|
void ClearToDefault(const ::std::string* default_value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
ClearToDefaultNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
void ClearToDefaultNoArena(const ::std::string* default_value) |
|
|
|
|
PROTOBUF_ALWAYS_INLINE; |
|
|
|
|
|
|
|
|
|
void Destroy(const ::std::string* default_value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
DestroyNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
void DestroyNoArena(const ::std::string* default_value) PROTOBUF_ALWAYS_INLINE; |
|
|
|
@ -96,16 +96,16 @@ class PROTOBUF_EXPORT InlinedStringField { |
|
|
|
|
const ::std::string& GetNoArena() const PROTOBUF_ALWAYS_INLINE; |
|
|
|
|
|
|
|
|
|
::std::string* Mutable(const ::std::string* default_value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
return MutableNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
::std::string* MutableNoArena(const ::std::string* default_value) |
|
|
|
|
PROTOBUF_ALWAYS_INLINE; |
|
|
|
|
|
|
|
|
|
::std::string* Release(const ::std::string* default_value, Arena* arena) { |
|
|
|
|
::std::string* Release(const ::std::string* default_value, Arena* /*arena*/) { |
|
|
|
|
return ReleaseNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
::std::string* ReleaseNonDefault(const ::std::string* default_value, Arena* arena) { |
|
|
|
|
::std::string* ReleaseNonDefault(const ::std::string* default_value, Arena* /*arena*/) { |
|
|
|
|
return ReleaseNonDefaultNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
::std::string* ReleaseNoArena(const ::std::string* default_value) { |
|
|
|
@ -114,22 +114,22 @@ class PROTOBUF_EXPORT InlinedStringField { |
|
|
|
|
::std::string* ReleaseNonDefaultNoArena(const ::std::string* default_value); |
|
|
|
|
|
|
|
|
|
void Set(const ::std::string* default_value, StringPiece value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
SetNoArena(default_value, value); |
|
|
|
|
} |
|
|
|
|
void SetLite(const ::std::string* default_value, StringPiece value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
SetNoArena(default_value, value); |
|
|
|
|
} |
|
|
|
|
void SetNoArena(const ::std::string* default_value, |
|
|
|
|
StringPiece value) PROTOBUF_ALWAYS_INLINE; |
|
|
|
|
|
|
|
|
|
void Set(const ::std::string* default_value, const ::std::string& value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
SetNoArena(default_value, value); |
|
|
|
|
} |
|
|
|
|
void SetLite(const ::std::string* default_value, const ::std::string& value, |
|
|
|
|
Arena* arena) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
Arena* /*arena*/) PROTOBUF_ALWAYS_INLINE { |
|
|
|
|
SetNoArena(default_value, value); |
|
|
|
|
} |
|
|
|
|
void SetNoArena(const ::std::string* default_value, |
|
|
|
@ -141,7 +141,7 @@ class PROTOBUF_EXPORT InlinedStringField { |
|
|
|
|
#endif |
|
|
|
|
void SetAllocated(const ::std::string* default_value, |
|
|
|
|
::std::string* value, |
|
|
|
|
Arena* arena) { |
|
|
|
|
Arena* /*arena*/) { |
|
|
|
|
SetAllocatedNoArena(default_value, value); |
|
|
|
|
} |
|
|
|
|
void SetAllocatedNoArena(const ::std::string* default_value, |
|
|
|
@ -153,7 +153,7 @@ class PROTOBUF_EXPORT InlinedStringField { |
|
|
|
|
void UnsafeArenaSetAllocated( |
|
|
|
|
const ::std::string* default_value, ::std::string* value, Arena* arena); |
|
|
|
|
|
|
|
|
|
bool IsDefault(const ::std::string* default_value) { |
|
|
|
|
bool IsDefault(const ::std::string* /*default_value*/) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
private: |
|
|
|
@ -166,7 +166,7 @@ inline InlinedStringField::InlinedStringField(const ::std::string& default_value |
|
|
|
|
value_(default_value) {} |
|
|
|
|
|
|
|
|
|
inline void InlinedStringField::AssignWithDefault( |
|
|
|
|
const ::std::string* default_value, const InlinedStringField& from) { |
|
|
|
|
const ::std::string* /*default_value*/, const InlinedStringField& from) { |
|
|
|
|
value_ = from.value_; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -214,19 +214,19 @@ inline ::std::string* InlinedStringField::ReleaseNonDefaultNoArena( |
|
|
|
|
return released; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline void InlinedStringField::SetNoArena(const ::std::string* default_value, |
|
|
|
|
inline void InlinedStringField::SetNoArena(const ::std::string* /*default_value*/, |
|
|
|
|
StringPiece value) { |
|
|
|
|
value_.assign(value.data(), value.length()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline void InlinedStringField::SetNoArena( |
|
|
|
|
const ::std::string* default_value, const ::std::string& value) { |
|
|
|
|
const ::std::string* /*default_value*/, const ::std::string& value) { |
|
|
|
|
value_.assign(value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if LANG_CXX11 |
|
|
|
|
inline void InlinedStringField::SetNoArena( |
|
|
|
|
const ::std::string* default_value, ::std::string&& value) { |
|
|
|
|
const ::std::string* /*default_value*/, ::std::string&& value) { |
|
|
|
|
value_.assign(std::move(value)); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
@ -245,12 +245,12 @@ inline void InlinedStringField::UnsafeSetDefault( |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline ::std::string* InlinedStringField::UnsafeArenaRelease( |
|
|
|
|
const ::std::string* default_value, Arena* arena) { |
|
|
|
|
const ::std::string* default_value, Arena* /*arena*/) { |
|
|
|
|
return ReleaseNoArena(default_value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline void InlinedStringField::UnsafeArenaSetAllocated( |
|
|
|
|
const ::std::string* default_value, ::std::string* value, Arena* arena) { |
|
|
|
|
const ::std::string* default_value, ::std::string* value, Arena* /*arena*/) { |
|
|
|
|
if (value == NULL) { |
|
|
|
|
value_.assign(*default_value); |
|
|
|
|
} else { |
|
|
|
|