aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/map.h')
-rw-r--r--src/google/protobuf/map.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
index 6463ac2e..c5afa200 100644
--- a/src/google/protobuf/map.h
+++ b/src/google/protobuf/map.h
@@ -49,6 +49,10 @@
#include <google/protobuf/map_type_handler.h>
#include <google/protobuf/stubs/hash.h>
+#ifdef SWIG
+#error "You cannot SWIG proto headers"
+#endif
+
namespace google {
namespace protobuf {
@@ -78,7 +82,7 @@ class DynamicMapField;
class GeneratedMessageReflection;
} // namespace internal
-// This is the class for google::protobuf::Map's internal value_type. Instead of using
+// This is the class for Map's internal value_type. Instead of using
// std::pair as value_type, we use this class which provides us more control of
// its process of construction and destruction.
template <typename Key, typename T>
@@ -105,11 +109,11 @@ class MapPair {
T second;
private:
- friend class ::google::protobuf::Arena;
+ friend class Arena;
friend class Map<Key, T>;
};
-// google::protobuf::Map is an associative container type used to store protobuf map
+// Map is an associative container type used to store protobuf map
// fields. Each Map instance may or may not use a different hash function, a
// different iteration order, and so on. E.g., please don't examine
// implementation details to decide if the following would work:
@@ -181,7 +185,7 @@ class Map {
}
// re-implement std::allocator to use arena allocator for memory allocation.
- // Used for google::protobuf::Map implementation. Users should not use this class
+ // Used for Map implementation. Users should not use this class
// directly.
template <typename U>
class MapAllocator {
@@ -1047,9 +1051,8 @@ class Map {
value_type** value = &(*elements_)[key];
if (*value == NULL) {
*value = CreateValueTypeInternal(key);
- internal::MapValueInitializer<google::protobuf::is_proto_enum<T>::value,
- T>::Initialize((*value)->second,
- default_enum_value_);
+ internal::MapValueInitializer<is_proto_enum<T>::value, T>::Initialize(
+ (*value)->second, default_enum_value_);
}
return (*value)->second;
}
@@ -1203,7 +1206,7 @@ class Map {
int default_enum_value_;
InnerMap* elements_;
- friend class ::google::protobuf::Arena;
+ friend class Arena;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
template <typename Derived, typename K, typename V,
@@ -1214,6 +1217,6 @@ class Map {
};
} // namespace protobuf
-
} // namespace google
+
#endif // GOOGLE_PROTOBUF_MAP_H__