Skip to content

Commit

Permalink
added explicit cast (#8066)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Bailey <[email protected]>
  • Loading branch information
reshilkin and dbaileychess authored Sep 29, 2023
1 parent 3c35a14 commit 7f417e3
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 @@ -3425,7 +3425,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 7f417e3

Please sign in to comment.