aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/Compiler.cpp
diff options
context:
space:
mode:
authorMathias Baumann <marenz@supradigital.org>2018-12-11 02:02:39 +0800
committerMathias Baumann <marenz@supradigital.org>2018-12-11 02:02:39 +0800
commit2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8 (patch)
tree690b5cc720bb114ec614b74379b8551a8abf5c17 /liblll/Compiler.cpp
parent871ea22bb9158e23254406d21673cfbeda2d7138 (diff)
downloaddexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.gz
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.tar.zst
dexon-solidity-2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8.zip
Replace push_back with emplace_back where it makes sense
Diffstat (limited to 'liblll/Compiler.cpp')
-rw-r--r--liblll/Compiler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp
index f944adbd..6296cbcf 100644
--- a/liblll/Compiler.cpp
+++ b/liblll/Compiler.cpp
@@ -46,22 +46,22 @@ bytes dev::lll::compileLLL(string const& _src, dev::solidity::EVMVersion _evmVer
{
if (_errors)
{
- _errors->push_back("Parse error.");
- _errors->push_back(boost::diagnostic_information(_e));
+ _errors->emplace_back("Parse error.");
+ _errors->emplace_back(boost::diagnostic_information(_e));
}
}
catch (std::exception const& _e)
{
if (_errors)
{
- _errors->push_back("Parse exception.");
- _errors->push_back(boost::diagnostic_information(_e));
+ _errors->emplace_back("Parse exception.");
+ _errors->emplace_back(boost::diagnostic_information(_e));
}
}
catch (...)
{
if (_errors)
- _errors->push_back("Internal compiler exception.");
+ _errors->emplace_back("Internal compiler exception.");
}
return bytes();
}
@@ -84,22 +84,22 @@ std::string dev::lll::compileLLLToAsm(std::string const& _src, EVMVersion _evmVe
{
if (_errors)
{
- _errors->push_back("Parse error.");
- _errors->push_back(boost::diagnostic_information(_e));
+ _errors->emplace_back("Parse error.");
+ _errors->emplace_back(boost::diagnostic_information(_e));
}
}
catch (std::exception const& _e)
{
if (_errors)
{
- _errors->push_back("Parse exception.");
- _errors->push_back(boost::diagnostic_information(_e));
+ _errors->emplace_back("Parse exception.");
+ _errors->emplace_back(boost::diagnostic_information(_e));
}
}
catch (...)
{
if (_errors)
- _errors->push_back("Internal compiler exception.");
+ _errors->emplace_back("Internal compiler exception.");
}
return string();
}