@@ -49,7 +49,7 @@ ParseResult ConfigReader::ProcessOptionValue(
4949 case options_parser::OptionType::kBoolean : {
5050 bool result;
5151 if (option_value->get_bool ().get (result)) {
52- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
52+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
5353 return ParseResult::InvalidContent;
5454 }
5555
@@ -75,13 +75,13 @@ ParseResult ConfigReader::ProcessOptionValue(
7575 std::vector<std::string> result;
7676 simdjson::ondemand::array raw_imports;
7777 if (option_value->get_array ().get (raw_imports)) {
78- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
78+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
7979 return ParseResult::InvalidContent;
8080 }
8181 for (auto raw_import : raw_imports) {
8282 std::string_view import ;
8383 if (raw_import.get_string (import )) {
84- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
84+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
8585 return ParseResult::InvalidContent;
8686 }
8787 output->push_back (option_name + " =" + std::string (import ));
@@ -91,22 +91,22 @@ ParseResult ConfigReader::ProcessOptionValue(
9191 case simdjson::ondemand::json_type::string: {
9292 std::string result;
9393 if (option_value->get_string (result)) {
94- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
94+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
9595 return ParseResult::InvalidContent;
9696 }
9797 output->push_back (option_name + " =" + result);
9898 break ;
9999 }
100100 default :
101- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
101+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
102102 return ParseResult::InvalidContent;
103103 }
104104 break ;
105105 }
106106 case options_parser::OptionType::kString : {
107107 std::string result;
108108 if (option_value->get_string (result)) {
109- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
109+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
110110 return ParseResult::InvalidContent;
111111 }
112112 output->push_back (option_name + " =" + result);
@@ -115,7 +115,7 @@ ParseResult ConfigReader::ProcessOptionValue(
115115 case options_parser::OptionType::kInteger : {
116116 int64_t result;
117117 if (option_value->get_int64 ().get (result)) {
118- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
118+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
119119 return ParseResult::InvalidContent;
120120 }
121121 output->push_back (option_name + " =" + std::to_string (result));
@@ -125,7 +125,7 @@ ParseResult ConfigReader::ProcessOptionValue(
125125 case options_parser::OptionType::kUInteger : {
126126 uint64_t result;
127127 if (option_value->get_uint64 ().get (result)) {
128- FPrintF (stderr, " Invalid value for %s\n " , option_name. c_str () );
128+ FPrintF (stderr, " Invalid value for %s\n " , option_name);
129129 return ParseResult::InvalidContent;
130130 }
131131 output->push_back (option_name + " =" + std::to_string (result));
@@ -134,13 +134,13 @@ ParseResult ConfigReader::ProcessOptionValue(
134134 case options_parser::OptionType::kNoOp : {
135135 FPrintF (stderr,
136136 " No-op flag %s is currently not supported\n " ,
137- option_name. c_str () );
137+ option_name);
138138 return ParseResult::InvalidContent;
139139 }
140140 case options_parser::OptionType::kV8Option : {
141141 FPrintF (stderr,
142142 " V8 flag %s is currently not supported\n " ,
143- option_name. c_str () );
143+ option_name);
144144 return ParseResult::InvalidContent;
145145 }
146146 default :
@@ -190,7 +190,7 @@ ParseResult ConfigReader::ParseOptions(
190190 // If the option has already been set, return an error
191191 if (unique_options->contains (option->first )) {
192192 FPrintF (
193- stderr, " Option %s is already defined\n " , option->first . c_str () );
193+ stderr, " Option %s is already defined\n " , option->first );
194194 return ParseResult::InvalidContent;
195195 }
196196 // Add the option to the unique set to prevent duplicates
@@ -206,7 +206,7 @@ ParseResult ConfigReader::ParseOptions(
206206 FPrintF (stderr,
207207 " Unknown or not allowed option %s for namespace %s\n " ,
208208 option_key,
209- namespace_name. c_str () );
209+ namespace_name);
210210 return ParseResult::InvalidContent;
211211 }
212212 }
@@ -303,7 +303,7 @@ ParseResult ConfigReader::ParseConfig(const std::string_view& config_path) {
303303 if (field_error) {
304304 FPrintF (stderr,
305305 " \" %s\" value unexpected for %s (should be an object)\n " ,
306- namespace_name. c_str () ,
306+ namespace_name,
307307 config_path.data ());
308308 return ParseResult::InvalidContent;
309309 }
0 commit comments