From e3f90565d8f623537072d84316d476343c2b06ad Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 27 Jul 2017 16:40:01 +0200 Subject: Avoid some Json copy operations. --- solc/CommandLineInterface.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'solc') 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); -- cgit