diff options
Diffstat (limited to 'src/compiler/ruby_generator_map-inl.h')
-rw-r--r-- | src/compiler/ruby_generator_map-inl.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/compiler/ruby_generator_map-inl.h b/src/compiler/ruby_generator_map-inl.h index f902b6d98f..6b87774f21 100644 --- a/src/compiler/ruby_generator_map-inl.h +++ b/src/compiler/ruby_generator_map-inl.h @@ -34,11 +34,12 @@ #ifndef GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_MAP_INL_H #define GRPC_INTERNAL_COMPILER_RUBY_GENERATOR_MAP_INL_H +#include "src/compiler/config.h" + #include <iostream> #include <initializer_list> #include <map> #include <ostream> // NOLINT -#include <string> #include <vector> using std::initializer_list; @@ -49,18 +50,18 @@ namespace grpc_ruby_generator { // Converts an initializer list of the form { key0, value0, key1, value1, ... } // into a map of key* to value*. Is merely a readability helper for later code. -inline std::map<std::string, std::string> ListToDict( - const initializer_list<std::string> &values) { +inline std::map<grpc::string, grpc::string> ListToDict( + const initializer_list<grpc::string> &values) { if (values.size() % 2 != 0) { std::cerr << "Not every 'key' has a value in `values`." << std::endl; } - std::map<std::string, std::string> value_map; + std::map<grpc::string, grpc::string> value_map; auto value_iter = values.begin(); for (unsigned i = 0; i < values.size() / 2; ++i) { - std::string key = *value_iter; + grpc::string key = *value_iter; ++value_iter; - std::string value = *value_iter; + grpc::string value = *value_iter; value_map[key] = value; ++value_iter; } |