aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/dynamic_message.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-09-07 16:15:38 -0700
committerGitHub <noreply@github.com>2018-09-07 16:15:38 -0700
commitf9d8138376765d229a32635c9209061e4e4aed8c (patch)
tree50719686fd7262f405c9bda8694d6c72e7c038b8 /src/google/protobuf/dynamic_message.h
parent2e7563f40ec7f901ae8ae1cc749d701fa07e211d (diff)
parente53be9bce4556cf0d13e24f1a25a7d75f663144f (diff)
downloadprotobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.gz
protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.bz2
protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.zip
Merge pull request #5109 from haberman/integrate
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/dynamic_message.h')
-rw-r--r--src/google/protobuf/dynamic_message.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/google/protobuf/dynamic_message.h b/src/google/protobuf/dynamic_message.h
index c614ee5a..1ea6f66f 100644
--- a/src/google/protobuf/dynamic_message.h
+++ b/src/google/protobuf/dynamic_message.h
@@ -51,6 +51,8 @@
#error "You cannot SWIG proto headers"
#endif
+#include <google/protobuf/port_def.inc>
+
namespace google {
namespace protobuf {
@@ -75,7 +77,7 @@ class DescriptorPool; // descriptor.h
// encapsulates this "cache". All DynamicMessages of the same type created
// from the same factory will share the same support data. Any Descriptors
// used with a particular factory must outlive the factory.
-class LIBPROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory {
+class PROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory {
public:
// Construct a DynamicMessageFactory that will search for extensions in
// the DescriptorPool in which the extendee is defined.
@@ -151,7 +153,7 @@ class LIBPROTOBUF_EXPORT DynamicMessageFactory : public MessageFactory {
};
// Helper for computing a sorted list of map entries via reflection.
-class LIBPROTOBUF_EXPORT DynamicMapSorter {
+class PROTOBUF_EXPORT DynamicMapSorter {
public:
static std::vector<const Message*> Sort(const Message& message,
int map_size,
@@ -182,7 +184,7 @@ class LIBPROTOBUF_EXPORT DynamicMapSorter {
}
private:
- class LIBPROTOBUF_EXPORT MapEntryMessageComparator {
+ class PROTOBUF_EXPORT MapEntryMessageComparator {
public:
explicit MapEntryMessageComparator(const Descriptor* descriptor)
: field_(descriptor->field(0)) {}
@@ -216,8 +218,8 @@ class LIBPROTOBUF_EXPORT DynamicMapSorter {
return first < second;
}
case FieldDescriptor::CPPTYPE_STRING: {
- string first = reflection->GetString(*a, field_);
- string second = reflection->GetString(*b, field_);
+ std::string first = reflection->GetString(*a, field_);
+ std::string second = reflection->GetString(*b, field_);
return first < second;
}
default:
@@ -234,4 +236,6 @@ class LIBPROTOBUF_EXPORT DynamicMapSorter {
} // namespace protobuf
} // namespace google
+#include <google/protobuf/port_undef.inc>
+
#endif // GOOGLE_PROTOBUF_DYNAMIC_MESSAGE_H__