diff options
author | Mathias Baumann <marenz@supradigital.org> | 2018-12-11 02:02:39 +0800 |
---|---|---|
committer | Mathias Baumann <marenz@supradigital.org> | 2018-12-11 02:02:39 +0800 |
commit | 2f6dc2e773148f63f4e2b9d9b3f9bb7eb092fde8 (patch) | |
tree | 690b5cc720bb114ec614b74379b8551a8abf5c17 /liblll/CodeFragment.cpp | |
parent | 871ea22bb9158e23254406d21673cfbeda2d7138 (diff) | |
download | dexon-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/CodeFragment.cpp')
-rw-r--r-- | liblll/CodeFragment.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index b32f14e9..63d8da3d 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -353,7 +353,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) if (j.tag() || j.which() != sp::utree_type::symbol_type) error<InvalidMacroArgs>(); auto sr = j.get<sp::basic_string<boost::iterator_range<char const*>, sp::utree_type::symbol_type>>(); - args.push_back(string(sr.begin(), sr.end())); + args.emplace_back(sr.begin(), sr.end()); } else if (ii == 3) { @@ -464,9 +464,9 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) if (c++) { if (us == "LLL" && c == 1) - code.push_back(CodeFragment(i, ns, m_readFile)); + code.emplace_back(i, ns, m_readFile); else - code.push_back(CodeFragment(i, _s, m_readFile)); + code.emplace_back(i, _s, m_readFile); } auto requireSize = [&](unsigned s) { if (code.size() != s) error<IncorrectParameterCount>(us); }; auto requireMinSize = [&](unsigned s) { if (code.size() < s) error<IncorrectParameterCount>(us); }; |