mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixing signedness conversion warnings in libevmasm
Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
This commit is contained in:
co-authored by
Harikrishnan Mulackal
parent
b9f2697a3c
commit
e4e3f49844
@@ -262,7 +262,7 @@ bool ComputeMethod::checkRepresentation(u256 const& _value, AssemblyItems const&
|
||||
{
|
||||
case Operation:
|
||||
{
|
||||
if (stack.size() < size_t(item.arguments()))
|
||||
if (stack.size() < item.arguments())
|
||||
return false;
|
||||
u256* sp = &stack.back();
|
||||
switch (item.instruction())
|
||||
@@ -320,7 +320,7 @@ bool ComputeMethod::checkRepresentation(u256 const& _value, AssemblyItems const&
|
||||
|
||||
bigint ComputeMethod::gasNeeded(AssemblyItems const& _routine) const
|
||||
{
|
||||
size_t numExps = count(_routine.begin(), _routine.end(), Instruction::EXP);
|
||||
auto numExps = static_cast<size_t>(count(_routine.begin(), _routine.end(), Instruction::EXP));
|
||||
return combineGas(
|
||||
simpleRunGas(_routine) + numExps * (GasCosts::expGas + GasCosts::expByteGas(m_params.evmVersion)),
|
||||
// Data gas for routine: Some bytes are zero, but we ignore them.
|
||||
|
||||
Reference in New Issue
Block a user