diff options
author | chriseth <chris@ethereum.org> | 2018-10-29 22:12:02 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-11-08 02:30:27 +0800 |
commit | 674e17c2a895eff6729357d8c10db709ac368b79 (patch) | |
tree | 300a55700b068709f36340563db1b43e5b8b1188 /libsolidity/inlineasm/AsmScopeFiller.cpp | |
parent | 0a96f091ab63e8d77106e00590a442c59714eecb (diff) | |
download | dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.gz dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.bz2 dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.lz dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.xz dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.tar.zst dexon-solidity-674e17c2a895eff6729357d8c10db709ac368b79.zip |
Performance: Replace string by special single-copy YulString class.
Diffstat (limited to 'libsolidity/inlineasm/AsmScopeFiller.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmScopeFiller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/inlineasm/AsmScopeFiller.cpp b/libsolidity/inlineasm/AsmScopeFiller.cpp index 2d15c820..d1f98083 100644 --- a/libsolidity/inlineasm/AsmScopeFiller.cpp +++ b/libsolidity/inlineasm/AsmScopeFiller.cpp @@ -57,7 +57,7 @@ bool ScopeFiller::operator()(Label const& _item) //@TODO secondary location m_errorReporter.declarationError( _item.location, - "Label name " + _item.name + " already taken in this scope." + "Label name " + _item.name.str() + " already taken in this scope." ); return false; } @@ -77,16 +77,16 @@ bool ScopeFiller::operator()(assembly::FunctionDefinition const& _funDef) bool success = true; vector<Scope::YulType> arguments; for (auto const& _argument: _funDef.parameters) - arguments.push_back(_argument.type); + arguments.emplace_back(_argument.type.str()); vector<Scope::YulType> returns; for (auto const& _return: _funDef.returnVariables) - returns.push_back(_return.type); + returns.emplace_back(_return.type.str()); if (!m_currentScope->registerFunction(_funDef.name, arguments, returns)) { //@TODO secondary location m_errorReporter.declarationError( _funDef.location, - "Function name " + _funDef.name + " already taken in this scope." + "Function name " + _funDef.name.str() + " already taken in this scope." ); success = false; } @@ -164,7 +164,7 @@ bool ScopeFiller::registerVariable(TypedName const& _name, SourceLocation const& //@TODO secondary location m_errorReporter.declarationError( _location, - "Variable name " + _name.name + " already taken in this scope." + "Variable name " + _name.name.str() + " already taken in this scope." ); return false; } |