Merge pull request #5686 from ethereum/someStyle

Formatting.
This commit is contained in:
chriseth 2018-12-19 00:33:02 +01:00 committed by GitHub
commit 678a95f6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);