mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix: Segfaults connected to paramater types.
parameterTypes does not return by const reference anymore.
This commit is contained in:
@@ -278,9 +278,9 @@ void CommandLineInterface::handleGasEstimation(string const& _contract)
|
||||
gas = GasEstimator::functionalEstimation(*items, entry, *it);
|
||||
FunctionType type(*it);
|
||||
cout << " " << it->name() << "(";
|
||||
auto end = type.parameterTypes().end();
|
||||
for (auto it = type.parameterTypes().begin(); it != end; ++it)
|
||||
cout << (*it)->toString() << (it + 1 == end ? "" : ",");
|
||||
auto paramTypes = type.parameterTypes();
|
||||
for (auto it = paramTypes.begin(); it != paramTypes.end(); ++it)
|
||||
cout << (*it)->toString() << (it + 1 == paramTypes.end() ? "" : ",");
|
||||
cout << "):\t" << gas << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,9 +103,9 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract)
|
||||
gas = GasEstimator::functionalEstimation(*items, entry, *it);
|
||||
FunctionType type(*it);
|
||||
string sig = it->name() + "(";
|
||||
auto end = type.parameterTypes().end();
|
||||
for (auto it = type.parameterTypes().begin(); it != end; ++it)
|
||||
sig += (*it)->toString() + (it + 1 == end ? "" : ",");
|
||||
auto paramTypes = type.parameterTypes();
|
||||
for (auto it = paramTypes.begin(); it != paramTypes.end(); ++it)
|
||||
sig += (*it)->toString() + (it + 1 == paramTypes.end() ? "" : ",");
|
||||
sig += ")";
|
||||
internalFunctions[sig] = gasToJson(gas);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user