mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-01 12:11:38 +00:00
added explicit cast (#8066)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -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.
|
// Get an indentifier: NAN, INF, or function name like cos/sin/deg.
|
||||||
NEXT();
|
NEXT();
|
||||||
if (token_ != kTokenIdentifier) return Error("constant name expected");
|
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;
|
const auto in_type = e.type.base_type;
|
||||||
@@ -3425,7 +3425,7 @@ CheckedError Parser::ParseFlexBufferValue(flexbuffers::Builder *builder) {
|
|||||||
NEXT();
|
NEXT();
|
||||||
if (token_ != kTokenIdentifier)
|
if (token_ != kTokenIdentifier)
|
||||||
return Error("floating-point constant expected");
|
return Error("floating-point constant expected");
|
||||||
attribute_.insert(0, 1, sign);
|
attribute_.insert(size_t(0), size_t(1), sign);
|
||||||
ECHECK(ParseFlexBufferNumericConstant(builder));
|
ECHECK(ParseFlexBufferNumericConstant(builder));
|
||||||
NEXT();
|
NEXT();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user