Skip to content

Commit

Permalink
added explicit cast (google#8066)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Bailey <derekbailey@google.com>
  • Loading branch information
2 people authored and Jochen Parmentier committed Oct 29, 2024
1 parent a478ec6 commit 02690c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/idl_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,7 @@ CheckedError Parser::ParseSingleValue(const std::string *name, Value &e,
// Get an indentifier: NAN, INF, or function name like cos/sin/deg.
NEXT();
if (token_ != kTokenIdentifier) return Error("constant name expected");
attribute_.insert(0, 1, sign);
attribute_.insert(size_t(0), size_t(1), sign);
}

const auto in_type = e.type.base_type;
Expand Down Expand Up @@ -3429,7 +3429,7 @@ CheckedError Parser::ParseFlexBufferValue(flexbuffers::Builder *builder) {
NEXT();
if (token_ != kTokenIdentifier)
return Error("floating-point constant expected");
attribute_.insert(0, 1, sign);
attribute_.insert(size_t(0), size_t(1), sign);
ECHECK(ParseFlexBufferNumericConstant(builder));
NEXT();
break;
Expand Down

0 comments on commit 02690c2

Please sign in to comment.