aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/type_info.cc
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2016-11-17 16:48:38 -0800
committerGravatar Adam Cozzette <acozzette@google.com>2016-11-17 16:59:59 -0800
commit5a76e633ea9b5adb215e93fdc11e1c0c08b3fc74 (patch)
tree0276f81f8848a05d84cd7e287b43d665e30f04e3 /src/google/protobuf/util/internal/type_info.cc
parente28286fa05d8327fd6c5aa70cfb3be558f0932b8 (diff)
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/util/internal/type_info.cc')
-rw-r--r--src/google/protobuf/util/internal/type_info.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/google/protobuf/util/internal/type_info.cc b/src/google/protobuf/util/internal/type_info.cc
index 00a8ee7a..17d58475 100644
--- a/src/google/protobuf/util/internal/type_info.cc
+++ b/src/google/protobuf/util/internal/type_info.cc
@@ -60,7 +60,8 @@ class TypeInfoForTypeResolver : public TypeInfo {
virtual util::StatusOr<const google::protobuf::Type*> ResolveTypeUrl(
StringPiece type_url) const {
- map<StringPiece, StatusOrType>::iterator it = cached_types_.find(type_url);
+ std::map<StringPiece, StatusOrType>::iterator it =
+ cached_types_.find(type_url);
if (it != cached_types_.end()) {
return it->second;
}
@@ -85,7 +86,8 @@ class TypeInfoForTypeResolver : public TypeInfo {
virtual const google::protobuf::Enum* GetEnumByTypeUrl(
StringPiece type_url) const {
- map<StringPiece, StatusOrEnum>::iterator it = cached_enums_.find(type_url);
+ std::map<StringPiece, StatusOrEnum>::iterator it =
+ cached_enums_.find(type_url);
if (it != cached_enums_.end()) {
return it->second.ok() ? it->second.ValueOrDie() : NULL;
}
@@ -123,8 +125,8 @@ class TypeInfoForTypeResolver : public TypeInfo {
typedef util::StatusOr<const google::protobuf::Enum*> StatusOrEnum;
template <typename T>
- static void DeleteCachedTypes(map<StringPiece, T>* cached_types) {
- for (typename map<StringPiece, T>::iterator it = cached_types->begin();
+ static void DeleteCachedTypes(std::map<StringPiece, T>* cached_types) {
+ for (typename std::map<StringPiece, T>::iterator it = cached_types->begin();
it != cached_types->end(); ++it) {
if (it->second.ok()) {
delete it->second.ValueOrDie();
@@ -151,13 +153,13 @@ class TypeInfoForTypeResolver : public TypeInfo {
// Stores string values that will be referenced by StringPieces in
// cached_types_, cached_enums_ and camel_case_name_table_.
- mutable set<string> string_storage_;
+ mutable std::set<string> string_storage_;
- mutable map<StringPiece, StatusOrType> cached_types_;
- mutable map<StringPiece, StatusOrEnum> cached_enums_;
+ mutable std::map<StringPiece, StatusOrType> cached_types_;
+ mutable std::map<StringPiece, StatusOrEnum> cached_enums_;
- mutable set<const google::protobuf::Type*> indexed_types_;
- mutable map<StringPiece, StringPiece> camel_case_name_table_;
+ mutable std::set<const google::protobuf::Type*> indexed_types_;
+ mutable std::map<StringPiece, StringPiece> camel_case_name_table_;
};
} // namespace