| 233 | } |
| 234 | |
| 235 | BENCHMARK_EXPORT |
| 236 | bool ParseDoubleFlag(const char* str, const char* flag, double* value) { |
| 237 | // Gets the value of the flag as a string. |
| 238 | const char* const value_str = ParseFlagValue(str, flag, false); |
| 239 | |
| 240 | // Aborts if the parsing failed. |
| 241 | if (value_str == nullptr) return false; |
| 242 | |
| 243 | // Sets *value to the value of the flag. |
| 244 | return ParseDouble(std::string("The value of flag --") + flag, value_str, |
| 245 | value); |
| 246 | } |
| 247 | |
| 248 | BENCHMARK_EXPORT |
| 249 | bool ParseStringFlag(const char* str, const char* flag, std::string* value) { |
no test coverage detected