aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/cpp_plugin.cc')
-rw-r--r--src/compiler/cpp_plugin.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc
index 17836b1612..e43278529d 100644
--- a/src/compiler/cpp_plugin.cc
+++ b/src/compiler/cpp_plugin.cc
@@ -35,6 +35,8 @@
//
#include <memory>
+#include <string>
+
#include "src/compiler/cpp_generator.h"
#include "src/compiler/cpp_generator_helpers.h"
#include <google/protobuf/descriptor.h>
@@ -50,9 +52,9 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator {
virtual ~CppGrpcGenerator() {}
virtual bool Generate(const google::protobuf::FileDescriptor* file,
- const string& parameter,
+ const std::string& parameter,
google::protobuf::compiler::GeneratorContext* context,
- string* error) const {
+ std::string* error) const {
if (file->options().cc_generic_services()) {
*error =
"cpp grpc proto compiler plugin does not work with generic "
@@ -61,7 +63,7 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator {
return false;
}
- string file_name = grpc_cpp_generator::StripProto(file->name());
+ std::string file_name = grpc_cpp_generator::StripProto(file->name());
// Generate .pb.h
Insert(context, file_name + ".pb.h", "includes",
@@ -80,8 +82,8 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator {
private:
// Insert the given code into the given file at the given insertion point.
void Insert(google::protobuf::compiler::GeneratorContext* context,
- const string& filename, const string& insertion_point,
- const string& code) const {
+ const std::string& filename, const std::string& insertion_point,
+ const std::string& code) const {
std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream> output(
context->OpenForInsert(filename, insertion_point));
google::protobuf::io::CodedOutputStream coded_out(output.get());