|
|
@ -101,6 +101,7 @@ |
|
|
|
#include "absl/memory/memory.h" |
|
|
|
#include "absl/memory/memory.h" |
|
|
|
#include "absl/strings/cord.h" |
|
|
|
#include "absl/strings/cord.h" |
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
|
|
|
|
#include "absl/types/optional.h" |
|
|
|
#include "google/protobuf/arena.h" |
|
|
|
#include "google/protobuf/arena.h" |
|
|
|
#include "google/protobuf/descriptor.h" |
|
|
|
#include "google/protobuf/descriptor.h" |
|
|
|
#include "google/protobuf/generated_message_reflection.h" |
|
|
|
#include "google/protobuf/generated_message_reflection.h" |
|
|
@ -601,6 +602,9 @@ class PROTOBUF_EXPORT Reflection final { |
|
|
|
friend class Reflection; |
|
|
|
friend class Reflection; |
|
|
|
|
|
|
|
|
|
|
|
absl::string_view CopyFromCord(const absl::Cord& cord) { |
|
|
|
absl::string_view CopyFromCord(const absl::Cord& cord) { |
|
|
|
|
|
|
|
if (absl::optional<absl::string_view> flat = cord.TryFlat()) { |
|
|
|
|
|
|
|
return *flat; |
|
|
|
|
|
|
|
} |
|
|
|
if (!buffer_) { |
|
|
|
if (!buffer_) { |
|
|
|
buffer_ = absl::make_unique<std::string>(); |
|
|
|
buffer_ = absl::make_unique<std::string>(); |
|
|
|
} |
|
|
|
} |
|
|
|