From 5a76e633ea9b5adb215e93fdc11e1c0c08b3fc74 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 17 Nov 2016 16:48:38 -0800 Subject: Integrated internal changes from Google --- src/google/protobuf/util/internal/type_info.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/google/protobuf/util/internal/type_info.cc') 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 ResolveTypeUrl( StringPiece type_url) const { - map::iterator it = cached_types_.find(type_url); + std::map::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::iterator it = cached_enums_.find(type_url); + std::map::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 StatusOrEnum; template - static void DeleteCachedTypes(map* cached_types) { - for (typename map::iterator it = cached_types->begin(); + static void DeleteCachedTypes(std::map* cached_types) { + for (typename std::map::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_storage_; + mutable std::set string_storage_; - mutable map cached_types_; - mutable map cached_enums_; + mutable std::map cached_types_; + mutable std::map cached_enums_; - mutable set indexed_types_; - mutable map camel_case_name_table_; + mutable std::set indexed_types_; + mutable std::map camel_case_name_table_; }; } // namespace -- cgit v1.2.3