Skip to content

Commit

Permalink
use normal conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump committed Sep 15, 2022
1 parent f82be68 commit d6acffb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/google/protobuf/io/tokenizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1003,11 +1003,12 @@ bool Tokenizer::ParseInteger(const std::string& text, uint64_t max_value,

double Tokenizer::ParseFloat(const std::string& text) {
double result;
GOOGLE_LOG_IF(DFATAL,
!TryParseFloat(text, &result))
<< " Tokenizer::ParseFloat() passed text that could not have been"
" tokenized as a float: "
<< absl::CEscape(text);
if (!TryParseFloat(text, &result)) {
LOG(DFATAL)
<< " Tokenizer::ParseFloat() passed text that could not have been"
" tokenized as a float: "
<< absl::CEscape(text);
}
return result;
}

Expand Down

0 comments on commit d6acffb

Please sign in to comment.