aboutsummaryrefslogtreecommitdiffstats
path: root/StructuralGasEstimator.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-05-06 19:56:40 +0800
committerchriseth <c@ethdev.com>2015-05-06 19:56:40 +0800
commitc731ae92ca68c2e2cdf761bdf1f81e27097e50fc (patch)
treea9b3ab8594588f65e325dd011d98602b253772ba /StructuralGasEstimator.cpp
parentc3e5fe6a1205068c9b5ded84f8ae96d97f855c1b (diff)
downloaddexon-solidity-c731ae92ca68c2e2cdf761bdf1f81e27097e50fc.tar.gz
dexon-solidity-c731ae92ca68c2e2cdf761bdf1f81e27097e50fc.tar.zst
dexon-solidity-c731ae92ca68c2e2cdf761bdf1f81e27097e50fc.zip
Use std::array.
Diffstat (limited to 'StructuralGasEstimator.cpp')
-rw-r--r--StructuralGasEstimator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/StructuralGasEstimator.cpp b/StructuralGasEstimator.cpp
index 2cf8c2a8..c90981a7 100644
--- a/StructuralGasEstimator.cpp
+++ b/StructuralGasEstimator.cpp
@@ -31,7 +31,7 @@ using namespace dev;
using namespace dev::eth;
using namespace dev::solidity;
-map<ASTNode const*, GasMeter::GasConsumption[2]> StructuralGasEstimator::performEstimation(
+StructuralGasEstimator::ASTGasConsumptionSelfAccumulated StructuralGasEstimator::performEstimation(
AssemblyItems const& _items,
vector<ASTNode const*> const& _ast
)
@@ -42,7 +42,7 @@ map<ASTNode const*, GasMeter::GasConsumption[2]> StructuralGasEstimator::perform
for (auto const& item: _items)
particularCosts[item.getLocation()] += meter.estimateMax(item);
- map<ASTNode const*, GasMeter::GasConsumption[2]> gasCosts;
+ ASTGasConsumptionSelfAccumulated gasCosts;
auto onNode = [&](ASTNode const& _node)
{
gasCosts[&_node][0] = gasCosts[&_node][1] = particularCosts[_node.getLocation()];
@@ -60,7 +60,7 @@ map<ASTNode const*, GasMeter::GasConsumption[2]> StructuralGasEstimator::perform
}
map<ASTNode const*, GasMeter::GasConsumption> StructuralGasEstimator::breakToStatementLevel(
- map<ASTNode const*, GasMeter::GasConsumption[2]> const& _gasCosts,
+ ASTGasConsumptionSelfAccumulated const& _gasCosts,
vector<ASTNode const*> const& _roots
)
{