diff options
author | chriseth <chris@ethereum.org> | 2017-07-27 22:40:01 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-21 23:28:30 +0800 |
commit | e3f90565d8f623537072d84316d476343c2b06ad (patch) | |
tree | 44d2baeeed5e6c38577c743305e7f0234f8ea3cb /solc/CommandLineInterface.cpp | |
parent | 4219acaba98b22d6c7b118682480b180e5196f46 (diff) | |
download | dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.tar dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.tar.gz dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.tar.bz2 dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.tar.lz dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.tar.xz dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.tar.zst dexon-solidity-e3f90565d8f623537072d84316d476343c2b06ad.zip |
Avoid some Json copy operations.
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r-- | solc/CommandLineInterface.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 152526f4..bfc53aef 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -851,7 +851,7 @@ void CommandLineInterface::handleCombinedJSON() output[g_strContracts] = Json::Value(Json::objectValue); for (string const& contractName: contracts) { - Json::Value contractData(Json::objectValue); + Json::Value& contractData = output[g_strContracts][contractName] = Json::objectValue; if (requests.count(g_strAbi)) contractData[g_strAbi] = dev::jsonCompactPrint(m_compiler->contractABI(contractName)); if (requests.count("metadata")) @@ -885,7 +885,6 @@ void CommandLineInterface::handleCombinedJSON() contractData[g_strNatspecDev] = dev::jsonCompactPrint(m_compiler->natspecDev(contractName)); if (requests.count(g_strNatspecUser)) contractData[g_strNatspecUser] = dev::jsonCompactPrint(m_compiler->natspecUser(contractName)); - output[g_strContracts][contractName] = contractData; } bool needsSourceList = requests.count(g_strAst) || requests.count(g_strSrcMap) || requests.count(g_strSrcMapRuntime); |