diff options
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 46359f2b..be2709ae 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -835,10 +835,12 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) case FunctionType::Kind::RIPEMD160: { _functionCall.expression().accept(*this); - static const map<FunctionType::Kind, u256> contractAddresses{{FunctionType::Kind::ECRecover, 1}, - {FunctionType::Kind::SHA256, 2}, - {FunctionType::Kind::RIPEMD160, 3}}; - m_context << contractAddresses.find(function.kind())->second; + static map<FunctionType::Kind, u256> const contractAddresses{ + {FunctionType::Kind::ECRecover, 1}, + {FunctionType::Kind::SHA256, 2}, + {FunctionType::Kind::RIPEMD160, 3} + }; + m_context << contractAddresses.at(function.kind()); for (unsigned i = function.sizeOnStack(); i > 0; --i) m_context << swapInstruction(i); appendExternalFunctionCall(function, arguments); |