diff options
author | chriseth <chris@ethereum.org> | 2017-08-23 19:26:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-23 19:26:43 +0800 |
commit | c5f11d938f6670d9dbe0d7212097089c757fd91a (patch) | |
tree | eaebaac04092d5b05a5cba1211b046467d3263ae /solc | |
parent | 0ffc5db82b24b4897d5d09cebbaadba37fa63b45 (diff) | |
parent | 4b56829ac3dc28ea9ca6945fee22963149bcc2bd (diff) | |
download | dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.tar dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.tar.gz dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.tar.bz2 dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.tar.lz dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.tar.xz dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.tar.zst dexon-solidity-c5f11d938f6670d9dbe0d7212097089c757fd91a.zip |
Merge pull request #2656 from ethereum/performance1
Avoid some Json copy operations.
Diffstat (limited to 'solc')
-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); |