Skip to content

Commit 02690c2

Browse files
reshilkindbaileychess
authored andcommitted
added explicit cast (google#8066)
Co-authored-by: Derek Bailey <[email protected]>
1 parent a478ec6 commit 02690c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/idl_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ CheckedError Parser::ParseSingleValue(const std::string *name, Value &e,
21042104
// Get an indentifier: NAN, INF, or function name like cos/sin/deg.
21052105
NEXT();
21062106
if (token_ != kTokenIdentifier) return Error("constant name expected");
2107-
attribute_.insert(0, 1, sign);
2107+
attribute_.insert(size_t(0), size_t(1), sign);
21082108
}
21092109

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

0 commit comments

Comments
 (0)