aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-07-27 22:40:01 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-21 23:28:30 +0800
commite3f90565d8f623537072d84316d476343c2b06ad (patch)
tree44d2baeeed5e6c38577c743305e7f0234f8ea3cb /solc/CommandLineInterface.cpp
parent4219acaba98b22d6c7b118682480b180e5196f46 (diff)
downloaddexon-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.cpp3
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);