Skip to content

Commit

Permalink
Fix violations of -Wenum-float-conversion
Browse files Browse the repository at this point in the history
Reviewed By: avp

Differential Revision: D33439573

fbshipit-source-id: d55c2cbda4b1789895c89fa706cd1f53d423a3bf
  • Loading branch information
mhorowitz authored and facebook-github-bot committed Jan 8, 2022
1 parent 2c66a23 commit 1845dc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/hermes/IR/Instrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,8 @@ class CallBuiltinInst : public CallInst {
: CallInst(ValueKind::CallBuiltinInstKind, callee, thisValue, args) {
assert(
callee->getValue() == (int)callee->getValue() &&
callee->getValue() < BuiltinMethod::_count && "invalid builtin call");
callee->getValue() < (double)BuiltinMethod::_count &&
"invalid builtin call");
}
explicit CallBuiltinInst(
const CallBuiltinInst *src,
Expand All @@ -683,7 +684,7 @@ class GetBuiltinClosureInst : public Instruction {
: Instruction(ValueKind::GetBuiltinClosureInstKind) {
assert(
builtinIndex->asInt32() &&
builtinIndex->getValue() < BuiltinMethod::_count &&
builtinIndex->getValue() < (double)BuiltinMethod::_count &&
"invalid builtin call");
pushOperand(builtinIndex);
setType(Type::createClosure());
Expand Down

0 comments on commit 1845dc5

Please sign in to comment.