aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar tanderson-google <thomasanderson@google.com>2017-07-09 20:31:50 -0700
committerGravatar Adam Cozzette <acozzette@gmail.com>2017-07-09 20:31:50 -0700
commit126082c371d2320255ac8ff7d68bef25a919572d (patch)
tree72bf0b5b5d8ee5249d2128bc91936733eb42294b /src
parentb9c4daadf7e27c0a533f86d567a89b691aa0ad9f (diff)
Add std:: namespace prefix to set and map (#3332)
* Remove using std::{set,map}
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_field_base.cc4
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_field_base.h6
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_message.cc8
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_enum_field.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_enum_field.h6
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_extension.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_extension.h2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_field.cc6
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_field.h6
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_helpers.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_helpers.h2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_map_field.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_map_field.h2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_message.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_message_field.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_message_field.h6
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_params.h4
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_primitive_field.cc2
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_primitive_field.h8
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc4
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_enum_field.h2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_extension.cc4
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_field.cc4
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_field.h4
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_file.cc14
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_helpers.cc18
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_helpers.h6
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_map_field.cc2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_map_field.h2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_message.cc4
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_message.h2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_message_field.cc6
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_message_field.h4
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_oneof.h2
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc2
-rw-r--r--src/google/protobuf/stubs/common.h2
-rw-r--r--src/google/protobuf/testing/googletest.h2
37 files changed, 78 insertions, 80 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/src/google/protobuf/compiler/csharp/csharp_field_base.cc
index ebb8fbc2..ecf29ece 100644
--- a/src/google/protobuf/compiler/csharp/csharp_field_base.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_field_base.cc
@@ -54,7 +54,7 @@ namespace compiler {
namespace csharp {
void FieldGeneratorBase::SetCommonFieldVariables(
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
// Note: this will be valid even though the tag emitted for packed and unpacked versions of
// repeated fields varies by wire format. The wire format is encoded in the bottom 3 bits, which
// never effects the tag size.
@@ -92,7 +92,7 @@ void FieldGeneratorBase::SetCommonFieldVariables(
}
void FieldGeneratorBase::SetCommonOneofFieldVariables(
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
(*variables)["oneof_name"] = oneof_name();
(*variables)["has_property_check"] =
oneof_name() + "Case_ == " + oneof_property_name() +
diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.h b/src/google/protobuf/compiler/csharp/csharp_field_base.h
index 4109f3ca..df26853b 100644
--- a/src/google/protobuf/compiler/csharp/csharp_field_base.h
+++ b/src/google/protobuf/compiler/csharp/csharp_field_base.h
@@ -66,14 +66,14 @@ class FieldGeneratorBase : public SourceGeneratorBase {
protected:
const FieldDescriptor* descriptor_;
const int fieldOrdinal_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
void AddDeprecatedFlag(io::Printer* printer);
void AddNullCheck(io::Printer* printer);
void AddNullCheck(io::Printer* printer, const std::string& name);
void AddPublicMemberAttributes(io::Printer* printer);
- void SetCommonOneofFieldVariables(map<string, string>* variables);
+ void SetCommonOneofFieldVariables(std::map<string, string>* variables);
std::string oneof_property_name();
std::string oneof_name();
@@ -89,7 +89,7 @@ class FieldGeneratorBase : public SourceGeneratorBase {
std::string capitalized_type_name();
private:
- void SetCommonFieldVariables(map<string, string>* variables);
+ void SetCommonFieldVariables(std::map<string, string>* variables);
std::string GetStringDefaultValueInternal();
std::string GetBytesDefaultValueInternal();
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc
index 0f00a438..5ef0e4e8 100644
--- a/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -105,7 +105,7 @@ void MessageGenerator::AddDeprecatedFlag(io::Printer* printer) {
}
void MessageGenerator::Generate(io::Printer* printer) {
- map<string, string> vars;
+ std::map<string, string> vars;
vars["class_name"] = class_name();
vars["access_level"] = class_access_level();
@@ -280,7 +280,7 @@ bool MessageGenerator::HasNestedGeneratedTypes()
}
void MessageGenerator::GenerateCloningCode(io::Printer* printer) {
- map<string, string> vars;
+ std::map<string, string> vars;
WriteGeneratedCodeAttributes(printer);
vars["class_name"] = class_name();
printer->Print(
@@ -333,7 +333,7 @@ void MessageGenerator::GenerateFreezingCode(io::Printer* printer) {
}
void MessageGenerator::GenerateFrameworkMethods(io::Printer* printer) {
- map<string, string> vars;
+ std::map<string, string> vars;
vars["class_name"] = class_name();
// Equality
@@ -432,7 +432,7 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) {
// Note: These are separate from GenerateMessageSerializationMethods()
// because they need to be generated even for messages that are optimized
// for code size.
- map<string, string> vars;
+ std::map<string, string> vars;
vars["class_name"] = class_name();
WriteGeneratedCodeAttributes(printer);
diff --git a/src/google/protobuf/compiler/javanano/javanano_enum_field.cc b/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
index 7666db38..26bc7f85 100644
--- a/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_enum_field.cc
@@ -52,7 +52,7 @@ namespace {
// TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of
// repeat code between this and the other field types.
void SetEnumVariables(const Params& params,
- const FieldDescriptor* descriptor, map<string, string>* variables) {
+ const FieldDescriptor* descriptor, std::map<string, string>* variables) {
(*variables)["name"] =
RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
(*variables)["capitalized_name"] =
diff --git a/src/google/protobuf/compiler/javanano/javanano_enum_field.h b/src/google/protobuf/compiler/javanano/javanano_enum_field.h
index b94790d6..1be25d10 100644
--- a/src/google/protobuf/compiler/javanano/javanano_enum_field.h
+++ b/src/google/protobuf/compiler/javanano/javanano_enum_field.h
@@ -62,7 +62,7 @@ class EnumFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
vector<string> canonical_values_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator);
@@ -85,7 +85,7 @@ class AccessorEnumFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
vector<string> canonical_values_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorEnumFieldGenerator);
@@ -112,7 +112,7 @@ class RepeatedEnumFieldGenerator : public FieldGenerator {
void GenerateRepeatedDataSizeCode(io::Printer* printer) const;
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
vector<string> canonical_values_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator);
diff --git a/src/google/protobuf/compiler/javanano/javanano_extension.cc b/src/google/protobuf/compiler/javanano/javanano_extension.cc
index 0b9d1d8d..4c61f915 100644
--- a/src/google/protobuf/compiler/javanano/javanano_extension.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_extension.cc
@@ -78,7 +78,7 @@ const char* GetTypeConstantName(const FieldDescriptor::Type type) {
} // namespace
void SetVariables(const FieldDescriptor* descriptor, const Params params,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
(*variables)["extends"] = ClassName(params, descriptor->containing_type());
(*variables)["name"] = RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
bool repeated = descriptor->is_repeated();
diff --git a/src/google/protobuf/compiler/javanano/javanano_extension.h b/src/google/protobuf/compiler/javanano/javanano_extension.h
index 4843e296..f4e9eb2d 100644
--- a/src/google/protobuf/compiler/javanano/javanano_extension.h
+++ b/src/google/protobuf/compiler/javanano/javanano_extension.h
@@ -61,7 +61,7 @@ class ExtensionGenerator {
private:
const Params& params_;
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator);
};
diff --git a/src/google/protobuf/compiler/javanano/javanano_field.cc b/src/google/protobuf/compiler/javanano/javanano_field.cc
index 85257f3f..e31d1177 100644
--- a/src/google/protobuf/compiler/javanano/javanano_field.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_field.cc
@@ -151,7 +151,7 @@ const FieldGenerator& FieldGeneratorMap::get(
}
void SetCommonOneofVariables(const FieldDescriptor* descriptor,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
(*variables)["oneof_name"] =
UnderscoresToCamelCase(descriptor->containing_oneof());
(*variables)["oneof_capitalized_name"] =
@@ -169,7 +169,7 @@ void SetCommonOneofVariables(const FieldDescriptor* descriptor,
}
void GenerateOneofFieldEquals(const FieldDescriptor* descriptor,
- const map<string, string>& variables,
+ const std::map<string, string>& variables,
io::Printer* printer) {
if (GetJavaType(descriptor) == JAVATYPE_BYTES) {
printer->Print(variables,
@@ -190,7 +190,7 @@ void GenerateOneofFieldEquals(const FieldDescriptor* descriptor,
}
void GenerateOneofFieldHashCode(const FieldDescriptor* descriptor,
- const map<string, string>& variables,
+ const std::map<string, string>& variables,
io::Printer* printer) {
if (GetJavaType(descriptor) == JAVATYPE_BYTES) {
printer->Print(variables,
diff --git a/src/google/protobuf/compiler/javanano/javanano_field.h b/src/google/protobuf/compiler/javanano/javanano_field.h
index 57c221f4..347c888c 100644
--- a/src/google/protobuf/compiler/javanano/javanano_field.h
+++ b/src/google/protobuf/compiler/javanano/javanano_field.h
@@ -114,12 +114,12 @@ class FieldGeneratorMap {
};
void SetCommonOneofVariables(const FieldDescriptor* descriptor,
- map<string, string>* variables);
+ std::map<string, string>* variables);
void GenerateOneofFieldEquals(const FieldDescriptor* descriptor,
- const map<string, string>& variables,
+ const std::map<string, string>& variables,
io::Printer* printer);
void GenerateOneofFieldHashCode(const FieldDescriptor* descriptor,
- const map<string, string>& variables,
+ const std::map<string, string>& variables,
io::Printer* printer);
} // namespace javanano
diff --git a/src/google/protobuf/compiler/javanano/javanano_helpers.cc b/src/google/protobuf/compiler/javanano/javanano_helpers.cc
index 5018250c..1927ba12 100644
--- a/src/google/protobuf/compiler/javanano/javanano_helpers.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_helpers.cc
@@ -567,7 +567,7 @@ string GenerateDifferentBit(int bit_index) {
}
void SetBitOperationVariables(const string name,
- int bitIndex, map<string, string>* variables) {
+ int bitIndex, std::map<string, string>* variables) {
(*variables)["get_" + name] = GenerateGetBit(bitIndex);
(*variables)["set_" + name] = GenerateSetBit(bitIndex);
(*variables)["clear_" + name] = GenerateClearBit(bitIndex);
diff --git a/src/google/protobuf/compiler/javanano/javanano_helpers.h b/src/google/protobuf/compiler/javanano/javanano_helpers.h
index 014c85ae..04b2d633 100644
--- a/src/google/protobuf/compiler/javanano/javanano_helpers.h
+++ b/src/google/protobuf/compiler/javanano/javanano_helpers.h
@@ -181,7 +181,7 @@ string GenerateDifferentBit(int bit_index);
// the given name of the bit, to the appropriate Java expressions for the given
// bit index.
void SetBitOperationVariables(const string name,
- int bitIndex, map<string, string>* variables);
+ int bitIndex, std::map<string, string>* variables);
inline bool IsMapEntry(const Descriptor* descriptor) {
// TODO(liujisi): Add an option to turn on maps for proto2 syntax as well.
diff --git a/src/google/protobuf/compiler/javanano/javanano_map_field.cc b/src/google/protobuf/compiler/javanano/javanano_map_field.cc
index 83b2b0ce..a4ab8858 100644
--- a/src/google/protobuf/compiler/javanano/javanano_map_field.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_map_field.cc
@@ -84,7 +84,7 @@ const FieldDescriptor* ValueField(const FieldDescriptor* descriptor) {
}
void SetMapVariables(const Params& params,
- const FieldDescriptor* descriptor, map<string, string>* variables) {
+ const FieldDescriptor* descriptor, std::map<string, string>* variables) {
const FieldDescriptor* key = KeyField(descriptor);
const FieldDescriptor* value = ValueField(descriptor);
(*variables)["name"] =
diff --git a/src/google/protobuf/compiler/javanano/javanano_map_field.h b/src/google/protobuf/compiler/javanano/javanano_map_field.h
index c01bde38..81e5915d 100644
--- a/src/google/protobuf/compiler/javanano/javanano_map_field.h
+++ b/src/google/protobuf/compiler/javanano/javanano_map_field.h
@@ -58,7 +58,7 @@ class MapFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator);
};
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc
index f81f7f9a..78421887 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_message.cc
@@ -182,7 +182,7 @@ void MessageGenerator::Generate(io::Printer* printer) {
}
// oneof
- map<string, string> vars;
+ std::map<string, string> vars;
vars["message_name"] = descriptor_->name();
for (int i = 0; i < descriptor_->oneof_decl_count(); i++) {
const OneofDescriptor* oneof_desc = descriptor_->oneof_decl(i);
diff --git a/src/google/protobuf/compiler/javanano/javanano_message_field.cc b/src/google/protobuf/compiler/javanano/javanano_message_field.cc
index d1d04b52..2ed8a3aa 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message_field.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_message_field.cc
@@ -54,7 +54,7 @@ namespace {
// TODO(kenton): Factor out a "SetCommonFieldVariables()" to get rid of
// repeat code between this and the other field types.
void SetMessageVariables(const Params& params,
- const FieldDescriptor* descriptor, map<string, string>* variables) {
+ const FieldDescriptor* descriptor, std::map<string, string>* variables) {
(*variables)["name"] =
RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
(*variables)["capitalized_name"] =
diff --git a/src/google/protobuf/compiler/javanano/javanano_message_field.h b/src/google/protobuf/compiler/javanano/javanano_message_field.h
index e074735c..0ae8879b 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message_field.h
+++ b/src/google/protobuf/compiler/javanano/javanano_message_field.h
@@ -62,7 +62,7 @@ class MessageFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
};
@@ -85,7 +85,7 @@ class MessageOneofFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageOneofFieldGenerator);
};
@@ -108,7 +108,7 @@ class RepeatedMessageFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator);
};
diff --git a/src/google/protobuf/compiler/javanano/javanano_params.h b/src/google/protobuf/compiler/javanano/javanano_params.h
index e3b4bb93..3594767d 100644
--- a/src/google/protobuf/compiler/javanano/javanano_params.h
+++ b/src/google/protobuf/compiler/javanano/javanano_params.h
@@ -47,8 +47,8 @@ enum eMultipleFiles { JAVANANO_MUL_UNSET, JAVANANO_MUL_FALSE, JAVANANO_MUL_TRUE
// Parameters for used by the generators
class Params {
public:
- typedef map<string, string> NameMap;
- typedef set<string> NameSet;
+ typedef std::map<string, string> NameMap;
+ typedef std::set<string> NameSet;
private:
string empty_;
string base_name_;
diff --git a/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc b/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
index 978abf2c..66a0ff05 100644
--- a/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
@@ -166,7 +166,7 @@ bool AllAscii(const string& text) {
void SetPrimitiveVariables(const FieldDescriptor* descriptor, const Params params,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
(*variables)["name"] =
RenameJavaKeywords(UnderscoresToCamelCase(descriptor));
(*variables)["capitalized_name"] =
diff --git a/src/google/protobuf/compiler/javanano/javanano_primitive_field.h b/src/google/protobuf/compiler/javanano/javanano_primitive_field.h
index a01981dd..d7d72d57 100644
--- a/src/google/protobuf/compiler/javanano/javanano_primitive_field.h
+++ b/src/google/protobuf/compiler/javanano/javanano_primitive_field.h
@@ -65,7 +65,7 @@ class PrimitiveFieldGenerator : public FieldGenerator {
void GenerateSerializationConditional(io::Printer* printer) const;
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator);
};
@@ -89,7 +89,7 @@ class AccessorPrimitiveFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(AccessorPrimitiveFieldGenerator);
};
@@ -111,7 +111,7 @@ class PrimitiveOneofFieldGenerator : public FieldGenerator {
private:
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveOneofFieldGenerator);
};
@@ -137,7 +137,7 @@ class RepeatedPrimitiveFieldGenerator : public FieldGenerator {
void GenerateRepeatedDataSizeCode(io::Printer* printer) const;
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedPrimitiveFieldGenerator);
};
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
index 7a774a09..8899a13a 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
@@ -46,7 +46,7 @@ namespace objectivec {
namespace {
void SetEnumVariables(const FieldDescriptor* descriptor,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
string type = EnumName(descriptor->enum_type());
(*variables)["storage_type"] = type;
// For non repeated fields, if it was defined in a different file, the
@@ -118,7 +118,7 @@ void EnumFieldGenerator::GenerateCFunctionImplementations(
}
void EnumFieldGenerator::DetermineForwardDeclarations(
- set<string>* fwd_decls) const {
+ std::set<string>* fwd_decls) const {
SingleFieldGenerator::DetermineForwardDeclarations(fwd_decls);
// If it is an enum defined in a different file, then we'll need a forward
// declaration for it. When it is in our file, all the enums are output
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
index 946faa81..ae56c069 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
@@ -47,7 +47,7 @@ class EnumFieldGenerator : public SingleFieldGenerator {
public:
virtual void GenerateCFunctionDeclarations(io::Printer* printer) const;
virtual void GenerateCFunctionImplementations(io::Printer* printer) const;
- virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const;
+ virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
protected:
EnumFieldGenerator(const FieldDescriptor* descriptor, const Options& options);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_extension.cc b/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
index 73e4b86e..b788d0a3 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
@@ -59,7 +59,7 @@ ExtensionGenerator::ExtensionGenerator(const string& root_class_name,
ExtensionGenerator::~ExtensionGenerator() {}
void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) {
- map<string, string> vars;
+ std::map<string, string> vars;
vars["method_name"] = method_name_;
SourceLocation location;
if (descriptor_->GetSourceLocation(&location)) {
@@ -77,7 +77,7 @@ void ExtensionGenerator::GenerateMembersHeader(io::Printer* printer) {
void ExtensionGenerator::GenerateStaticVariablesInitialization(
io::Printer* printer) {
- map<string, string> vars;
+ std::map<string, string> vars;
vars["root_class_and_method_name"] = root_class_and_method_name_;
vars["extended_type"] = ClassName(descriptor_->containing_type());
vars["number"] = SimpleItoa(descriptor_->number());
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_field.cc
index 9f7e84f2..b6123fad 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_field.cc
@@ -49,7 +49,7 @@ namespace objectivec {
namespace {
void SetCommonFieldVariables(const FieldDescriptor* descriptor,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
string camel_case_name = FieldName(descriptor);
string raw_field_name;
if (descriptor->type() == FieldDescriptor::TYPE_GROUP) {
@@ -178,7 +178,7 @@ void FieldGenerator::GenerateCFunctionImplementations(
}
void FieldGenerator::DetermineForwardDeclarations(
- set<string>* fwd_decls) const {
+ std::set<string>* fwd_decls) const {
// Nothing
}
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_field.h b/src/google/protobuf/compiler/objectivec/objectivec_field.h
index a3a4b1b6..6bd5db2e 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_field.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_field.h
@@ -67,7 +67,7 @@ class FieldGenerator {
virtual void GenerateCFunctionImplementations(io::Printer* printer) const;
// Exposed for subclasses, should always call it on the parent class also.
- virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const;
+ virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
// Used during generation, not intended to be extended by subclasses.
void GenerateFieldDescription(
@@ -100,7 +100,7 @@ class FieldGenerator {
virtual bool WantsHasProperty(void) const = 0;
const FieldDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_file.cc b/src/google/protobuf/compiler/objectivec/objectivec_file.cc
index 7ad127bb..954b2688 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_file.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_file.cc
@@ -89,7 +89,7 @@ bool FileContainsExtensions(const FileDescriptor* file) {
void PruneFileAndDepsMarkingAsVisited(
const FileDescriptor* file,
vector<const FileDescriptor*>* files,
- set<const FileDescriptor*>* files_visited) {
+ std::set<const FileDescriptor*>* files_visited) {
vector<const FileDescriptor*>::iterator iter =
std::find(files->begin(), files->end(), file);
if (iter != files->end()) {
@@ -105,7 +105,7 @@ void PruneFileAndDepsMarkingAsVisited(
void CollectMinimalFileDepsContainingExtensionsWorker(
const FileDescriptor* file,
vector<const FileDescriptor*>* files,
- set<const FileDescriptor*>* files_visited) {
+ std::set<const FileDescriptor*>* files_visited) {
if (files_visited->find(file) != files_visited->end()) {
return;
}
@@ -138,7 +138,7 @@ void CollectMinimalFileDepsContainingExtensionsWorker(
void CollectMinimalFileDepsContainingExtensions(
const FileDescriptor* file,
vector<const FileDescriptor*>* files) {
- set<const FileDescriptor*> files_visited;
+ std::set<const FileDescriptor*> files_visited;
for (int i = 0; i < file->dependency_count(); i++) {
const FileDescriptor* dep = file->dependency(i);
CollectMinimalFileDepsContainingExtensionsWorker(dep, files,
@@ -229,12 +229,12 @@ void FileGenerator::GenerateHeader(io::Printer *printer) {
"CF_EXTERN_C_BEGIN\n"
"\n");
- set<string> fwd_decls;
+ std::set<string> fwd_decls;
for (vector<MessageGenerator *>::iterator iter = message_generators_.begin();
iter != message_generators_.end(); ++iter) {
(*iter)->DetermineForwardDeclarations(&fwd_decls);
}
- for (set<string>::const_iterator i(fwd_decls.begin());
+ for (std::set<string>::const_iterator i(fwd_decls.begin());
i != fwd_decls.end(); ++i) {
printer->Print("$value$;\n", "value", *i);
}
@@ -325,7 +325,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) {
// #import the headers for anything that a plain dependency of this proto
// file (that means they were just an include, not a "public" include).
- set<string> public_import_names;
+ std::set<string> public_import_names;
for (int i = 0; i < file_->public_dependency_count(); i++) {
public_import_names.insert(file_->public_dependency(i)->name());
}
@@ -468,7 +468,7 @@ void FileGenerator::GenerateSource(io::Printer *printer) {
// File descriptor only needed if there are messages to use it.
if (message_generators_.size() > 0) {
- map<string, string> vars;
+ std::map<string, string> vars;
vars["root_class_name"] = root_class_name_;
vars["package"] = file_->package();
vars["objc_prefix"] = FileClassPrefix(file_);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
index bb8170a9..e347ef1e 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
@@ -980,13 +980,13 @@ namespace {
class ExpectedPrefixesCollector : public LineConsumer {
public:
- ExpectedPrefixesCollector(map<string, string>* inout_package_to_prefix_map)
+ ExpectedPrefixesCollector(std::map<string, string>* inout_package_to_prefix_map)
: prefix_map_(inout_package_to_prefix_map) {}
virtual bool ConsumeLine(const StringPiece& line, string* out_error);
private:
- map<string, string>* prefix_map_;
+ std::map<string, string>* prefix_map_;
};
bool ExpectedPrefixesCollector::ConsumeLine(
@@ -1009,7 +1009,7 @@ bool ExpectedPrefixesCollector::ConsumeLine(
}
bool LoadExpectedPackagePrefixes(const Options &generation_options,
- map<string, string>* prefix_map,
+ std::map<string, string>* prefix_map,
string* out_error) {
if (generation_options.expected_prefixes_path.empty()) {
return true;
@@ -1023,7 +1023,7 @@ bool LoadExpectedPackagePrefixes(const Options &generation_options,
bool ValidateObjCClassPrefix(
const FileDescriptor* file,
const string& expected_prefixes_path,
- const map<string, string>& expected_package_prefixes,
+ const std::map<string, string>& expected_package_prefixes,
string* out_error) {
const string prefix = file->options().objc_class_prefix();
const string package = file->package();
@@ -1033,7 +1033,7 @@ bool ValidateObjCClassPrefix(
// Check: Error - See if there was an expected prefix for the package and
// report if it doesn't match (wrong or missing).
- map<string, string>::const_iterator package_match =
+ std::map<string, string>::const_iterator package_match =
expected_package_prefixes.find(package);
if (package_match != expected_package_prefixes.end()) {
// There was an entry, and...
@@ -1082,7 +1082,7 @@ bool ValidateObjCClassPrefix(
// Look for any other package that uses the same prefix.
string other_package_for_prefix;
- for (map<string, string>::const_iterator i = expected_package_prefixes.begin();
+ for (std::map<string, string>::const_iterator i = expected_package_prefixes.begin();
i != expected_package_prefixes.end(); ++i) {
if (i->second == prefix) {
other_package_for_prefix = i->first;
@@ -1150,7 +1150,7 @@ bool ValidateObjCClassPrefixes(const vector<const FileDescriptor*>& files,
const Options& generation_options,
string* out_error) {
// Load the expected package prefixes, if available, to validate against.
- map<string, string> expected_package_prefixes;
+ std::map<string, string> expected_package_prefixes;
if (!LoadExpectedPackagePrefixes(generation_options,
&expected_package_prefixes,
out_error)) {
@@ -1519,7 +1519,7 @@ void ImportWriter::AddFile(const FileDescriptor* file,
ParseFrameworkMappings();
}
- map<string, string>::iterator proto_lookup =
+ std::map<string, string>::iterator proto_lookup =
proto_file_to_framework_name_.find(file->name());
if (proto_lookup != proto_file_to_framework_name_.end()) {
other_framework_imports_.push_back(
@@ -1640,7 +1640,7 @@ bool ImportWriter::ProtoFrameworkCollector::ConsumeLine(
StringPiece proto_file(proto_file_list, start, offset - start);
StringPieceTrimWhitespace(&proto_file);
if (proto_file.size() != 0) {
- map<string, string>::iterator existing_entry =
+ std::map<string, string>::iterator existing_entry =
map_->find(proto_file.ToString());
if (existing_entry != map_->end()) {
std::cerr << "warning: duplicate proto file reference, replacing framework entry for '"
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
index c99262a1..daea7609 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
@@ -262,20 +262,20 @@ class LIBPROTOC_EXPORT ImportWriter {
private:
class ProtoFrameworkCollector : public LineConsumer {
public:
- ProtoFrameworkCollector(map<string, string>* inout_proto_file_to_framework_name)
+ ProtoFrameworkCollector(std::map<string, string>* inout_proto_file_to_framework_name)
: map_(inout_proto_file_to_framework_name) {}
virtual bool ConsumeLine(const StringPiece& line, string* out_error);
private:
- map<string, string>* map_;
+ std::map<string, string>* map_;
};
void ParseFrameworkMappings();
const string generate_for_named_framework_;
const string named_framework_to_proto_path_mappings_path_;
- map<string, string> proto_file_to_framework_name_;
+ std::map<string, string> proto_file_to_framework_name_;
bool need_to_parse_mapping_file_;
vector<string> protobuf_framework_imports_;
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
index 0bc9dc10..bcaf5709 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
@@ -162,7 +162,7 @@ void MapFieldGenerator::FinishInitialization(void) {
}
void MapFieldGenerator::DetermineForwardDeclarations(
- set<string>* fwd_decls) const {
+ std::set<string>* fwd_decls) const {
RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls);
const FieldDescriptor* value_descriptor =
descriptor_->message_type()->FindFieldByName("value");
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_map_field.h b/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
index bc68a682..6664d849 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
@@ -51,7 +51,7 @@ class MapFieldGenerator : public RepeatedFieldGenerator {
MapFieldGenerator(const FieldDescriptor* descriptor, const Options& options);
virtual ~MapFieldGenerator();
- virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const;
+ virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
private:
scoped_ptr<FieldGenerator> value_field_generator_;
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.cc b/src/google/protobuf/compiler/objectivec/objectivec_message.cc
index 0a554a83..4f22e290 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message.cc
@@ -233,7 +233,7 @@ void MessageGenerator::GenerateStaticVariablesInitialization(
}
}
-void MessageGenerator::DetermineForwardDeclarations(set<string>* fwd_decls) {
+void MessageGenerator::DetermineForwardDeclarations(std::set<string>* fwd_decls) {
if (!IsMapEntryMessage(descriptor_)) {
for (int i = 0; i < descriptor_->field_count(); i++) {
const FieldDescriptor* fieldDescriptor = descriptor_->field(i);
@@ -514,7 +514,7 @@ void MessageGenerator::GenerateSource(io::Printer* printer) {
" };\n");
}
- map<string, string> vars;
+ std::map<string, string> vars;
vars["classname"] = class_name_;
vars["rootclassname"] = root_classname_;
vars["fields"] = has_fields ? "fields" : "NULL";
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message.h b/src/google/protobuf/compiler/objectivec/objectivec_message.h
index 0fb78bc0..8f317ac0 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message.h
@@ -64,7 +64,7 @@ class MessageGenerator {
void GenerateMessageHeader(io::Printer* printer);
void GenerateSource(io::Printer* printer);
void GenerateExtensionRegistrationSource(io::Printer* printer);
- void DetermineForwardDeclarations(set<string>* fwd_decls);
+ void DetermineForwardDeclarations(std::set<string>* fwd_decls);
// Checks if the message or a nested message includes a oneof definition.
bool IncludesOneOfDefinition() const;
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
index d6ccd6d1..699d25b3 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc
@@ -45,7 +45,7 @@ namespace objectivec {
namespace {
void SetMessageVariables(const FieldDescriptor* descriptor,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
const string& message_type = ClassName(descriptor->message_type());
(*variables)["type"] = message_type;
(*variables)["containing_class"] = ClassName(descriptor->containing_type());
@@ -67,7 +67,7 @@ MessageFieldGenerator::MessageFieldGenerator(const FieldDescriptor* descriptor,
MessageFieldGenerator::~MessageFieldGenerator() {}
void MessageFieldGenerator::DetermineForwardDeclarations(
- set<string>* fwd_decls) const {
+ std::set<string>* fwd_decls) const {
ObjCObjFieldGenerator::DetermineForwardDeclarations(fwd_decls);
// Class name is already in "storage_type".
fwd_decls->insert("@class " + variable("storage_type"));
@@ -95,7 +95,7 @@ RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator(
RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {}
void RepeatedMessageFieldGenerator::DetermineForwardDeclarations(
- set<string>* fwd_decls) const {
+ std::set<string>* fwd_decls) const {
RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls);
// Class name is already in "storage_type".
fwd_decls->insert("@class " + variable("storage_type"));
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_message_field.h b/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
index d2dba153..50f4b6d4 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
@@ -51,7 +51,7 @@ class MessageFieldGenerator : public ObjCObjFieldGenerator {
virtual bool WantsHasProperty(void) const;
public:
- virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const;
+ virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator);
@@ -67,7 +67,7 @@ class RepeatedMessageFieldGenerator : public RepeatedFieldGenerator {
virtual ~RepeatedMessageFieldGenerator();
public:
- virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const;
+ virtual void DetermineForwardDeclarations(std::set<string>* fwd_decls) const;
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedMessageFieldGenerator);
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_oneof.h b/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
index 3d9df4db..ff353a6c 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
@@ -67,7 +67,7 @@ class OneofGenerator {
private:
const OneofDescriptor* descriptor_;
- map<string, string> variables_;
+ std::map<string, string> variables_;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(OneofGenerator);
};
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc b/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
index d49350f4..aa8ac324 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
+++ b/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc
@@ -118,7 +118,7 @@ const char* PrimitiveArrayTypeName(const FieldDescriptor* descriptor) {
}
void SetPrimitiveVariables(const FieldDescriptor* descriptor,
- map<string, string>* variables) {
+ std::map<string, string>* variables) {
std::string primitive_name = PrimitiveTypeName(descriptor);
(*variables)["type"] = primitive_name;
(*variables)["storage_type"] = primitive_name;
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index 60874e09..19d59843 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -227,10 +227,8 @@ class FatalException : public std::exception {
// in some versions of MSVC.
// TODO(acozzette): remove these using statements
using std::istream;
-using std::map;
using std::ostream;
using std::pair;
-using std::set;
using std::string;
using std::vector;
diff --git a/src/google/protobuf/testing/googletest.h b/src/google/protobuf/testing/googletest.h
index c0d99e69..bf8bf282 100644
--- a/src/google/protobuf/testing/googletest.h
+++ b/src/google/protobuf/testing/googletest.h
@@ -85,7 +85,7 @@ class ScopedMemoryLog {
const vector<string>& GetMessages(LogLevel error);
private:
- map<LogLevel, vector<string> > messages_;
+ std::map<LogLevel, vector<string> > messages_;
LogHandler* old_handler_;
static void HandleLog(LogLevel level, const char* filename, int line,