Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
Fix implicit conversion errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HiddenBug committed Nov 11, 2019
1 parent b78c128 commit 5e88493
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ MATCHER_P2(SpeedAtIGe, i, x,
"Speed at index " + PrintToString(i) + std::string(negation ? "is not" : "is") + " greater or equal to" +
PrintToString(x) + ".")
{
return static_cast<unsigned long>(i) < arg->name.size() && arg->speed.at(i) >= x;
return static_cast<unsigned long>(i) < arg->name.size() && arg->speed.at(static_cast<size_t>(i)) >= x;
}

MATCHER_P2(SpeedAtILe, i, x,
"Speed at index " + PrintToString(i) + std::string(negation ? "is not" : "is") + " less or equal to" +
PrintToString(x) + ".")
{
return static_cast<unsigned long>(i) < arg->name.size() && arg->speed.at(i) <= x;
return static_cast<unsigned long>(i) < arg->name.size() && arg->speed.at(static_cast<size_t>(i)) <= x;
}

/**
Expand Down

0 comments on commit 5e88493

Please sign in to comment.