diff options
author | Adam Cozzette <acozzette@google.com> | 2017-04-25 17:01:28 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-04-26 08:25:01 -0700 |
commit | 7c76ac1735a3b8f4523856bbd67588b6ccc7f850 (patch) | |
tree | b5198d8b815cfc08fdede21cd4a0969837b92930 /src/google/protobuf/compiler/command_line_interface.cc | |
parent | 4920e27a488976c9993cef686d868a846868eb56 (diff) |
Remove "using namespace std" from stubs/common.h
This prevents the contents of the std namespace from being effectively
pulled into the top-level namespace in all translation units that
include common.h. I left in individual using statements for a few common
things like std::set and std::map, because it did not seem worth going
through the churn of updating the whole codebase to fix those right now.
Diffstat (limited to 'src/google/protobuf/compiler/command_line_interface.cc')
-rw-r--r-- | src/google/protobuf/compiler/command_line_interface.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index f516477b..c2990779 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -804,8 +804,8 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { // Enforce --disallow_services. if (disallow_services_ && parsed_file->service_count() > 0) { - cerr << parsed_file->name() << ": This file contains services, but " - "--disallow_services was used." << endl; + std::cerr << parsed_file->name() << ": This file contains services, but " + "--disallow_services was used." << std::endl; return 1; } @@ -816,7 +816,7 @@ int CommandLineInterface::Run(int argc, const char* const argv[]) { if (direct_dependencies_.find(parsed_file->dependency(i)->name()) == direct_dependencies_.end()) { indirect_imports = true; - cerr << parsed_file->name() << ": " + std::cerr << parsed_file->name() << ": " << StringReplace(direct_dependencies_violation_msg_, "%s", parsed_file->dependency(i)->name(), true /* replace_all */) @@ -1221,7 +1221,7 @@ CommandLineInterface::InterpretArgument(const string& name, if (access(disk_path.c_str(), F_OK) < 0) { // Try the original path; it may have just happed to have a '=' in it. if (access(parts[i].c_str(), F_OK) < 0) { - cerr << disk_path << ": warning: directory does not exist." << endl; + std::cerr << disk_path << ": warning: directory does not exist." << std::endl; } else { virtual_path = ""; disk_path = parts[i]; @@ -1302,9 +1302,9 @@ CommandLineInterface::InterpretArgument(const string& name, if (!version_info_.empty()) { std::cout << version_info_ << std::endl; } - cout << "libprotoc " + std::cout << "libprotoc " << protobuf::internal::VersionString(GOOGLE_PROTOBUF_VERSION) - << endl; + << std::endl; return PARSE_ARGUMENT_DONE_AND_EXIT; // Exit without running compiler. } else if (name == "--disallow_services") { |