Ensure parameter names match between headers and implementation

This commit is contained in:
Alex Beregszaszi 2017-08-22 18:24:02 +01:00
parent 137b214be4
commit aad829948a
10 changed files with 21 additions and 21 deletions

View File

@ -26,7 +26,7 @@
namespace dev namespace dev
{ {
/// Compute the "swarm hash" of @a _data /// Compute the "swarm hash" of @a _input
h256 swarmHash(std::string const& _data); h256 swarmHash(std::string const& _input);
} }

View File

@ -91,7 +91,7 @@ protected:
} }
/// Replaces all constants i by the code given in @a _replacement[i]. /// Replaces all constants i by the code given in @a _replacement[i].
static void replaceConstants(AssemblyItems& _items, std::map<u256, AssemblyItems> const& _replacement); static void replaceConstants(AssemblyItems& _items, std::map<u256, AssemblyItems> const& _replacements);
Params m_params; Params m_params;
u256 const& m_value; u256 const& m_value;

View File

@ -189,9 +189,9 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item, bool _
return gas; return gas;
} }
GasMeter::GasConsumption GasMeter::wordGas(u256 const& _multiplier, ExpressionClasses::Id _position) GasMeter::GasConsumption GasMeter::wordGas(u256 const& _multiplier, ExpressionClasses::Id _value)
{ {
u256 const* value = m_state->expressionClasses().knownConstant(_position); u256 const* value = m_state->expressionClasses().knownConstant(_value);
if (!value) if (!value)
return GasConsumption::infinite(); return GasConsumption::infinite();
return GasConsumption(_multiplier * ((*value + 31) / 32)); return GasConsumption(_multiplier * ((*value + 31) / 32));

View File

@ -38,30 +38,30 @@ bool DocStringAnalyser::analyseDocStrings(SourceUnit const& _sourceUnit)
return !m_errorOccured; return !m_errorOccured;
} }
bool DocStringAnalyser::visit(ContractDefinition const& _node) bool DocStringAnalyser::visit(ContractDefinition const& _contract)
{ {
static const set<string> validTags = set<string>{"author", "title", "dev", "notice"}; static const set<string> validTags = set<string>{"author", "title", "dev", "notice"};
parseDocStrings(_node, _node.annotation(), validTags, "contracts"); parseDocStrings(_contract, _contract.annotation(), validTags, "contracts");
return true; return true;
} }
bool DocStringAnalyser::visit(FunctionDefinition const& _node) bool DocStringAnalyser::visit(FunctionDefinition const& _function)
{ {
handleCallable(_node, _node, _node.annotation()); handleCallable(_function, _function, _function.annotation());
return true; return true;
} }
bool DocStringAnalyser::visit(ModifierDefinition const& _node) bool DocStringAnalyser::visit(ModifierDefinition const& _modifier)
{ {
handleCallable(_node, _node, _node.annotation()); handleCallable(_modifier, _modifier, _modifier.annotation());
return true; return true;
} }
bool DocStringAnalyser::visit(EventDefinition const& _node) bool DocStringAnalyser::visit(EventDefinition const& _event)
{ {
handleCallable(_node, _node, _node.annotation()); handleCallable(_event, _event, _event.annotation());
return true; return true;
} }

View File

@ -148,7 +148,7 @@ public:
private: private:
bool visit(SourceUnit& _sourceUnit) override; bool visit(SourceUnit& _sourceUnit) override;
void endVisit(SourceUnit& _sourceUnit) override; void endVisit(SourceUnit& _sourceUnit) override;
bool visit(ImportDirective& _declaration) override; bool visit(ImportDirective& _import) override;
bool visit(ContractDefinition& _contract) override; bool visit(ContractDefinition& _contract) override;
void endVisit(ContractDefinition& _contract) override; void endVisit(ContractDefinition& _contract) override;
bool visit(StructDefinition& _struct) override; bool visit(StructDefinition& _struct) override;

View File

@ -50,8 +50,8 @@ private:
virtual bool visit(ContractDefinition const& _contract) override; virtual bool visit(ContractDefinition const& _contract) override;
virtual void endVisit(ContractDefinition const& _contract) override; virtual void endVisit(ContractDefinition const& _contract) override;
virtual bool visit(VariableDeclaration const& _declaration) override; virtual bool visit(VariableDeclaration const& _variable) override;
virtual void endVisit(VariableDeclaration const& _declaration) override; virtual void endVisit(VariableDeclaration const& _variable) override;
virtual bool visit(Identifier const& _identifier) override; virtual bool visit(Identifier const& _identifier) override;

View File

@ -96,8 +96,8 @@ private:
virtual bool visit(IfStatement const& _ifStatement) override; virtual bool visit(IfStatement const& _ifStatement) override;
virtual bool visit(WhileStatement const& _whileStatement) override; virtual bool visit(WhileStatement const& _whileStatement) override;
virtual bool visit(ForStatement const& _forStatement) override; virtual bool visit(ForStatement const& _forStatement) override;
virtual bool visit(Continue const& _continue) override; virtual bool visit(Continue const& _continueStatement) override;
virtual bool visit(Break const& _break) override; virtual bool visit(Break const& _breakStatement) override;
virtual bool visit(Return const& _return) override; virtual bool visit(Return const& _return) override;
virtual bool visit(Throw const& _throw) override; virtual bool visit(Throw const& _throw) override;
virtual bool visit(VariableDeclarationStatement const& _variableDeclarationStatement) override; virtual bool visit(VariableDeclarationStatement const& _variableDeclarationStatement) override;

View File

@ -86,7 +86,7 @@ public:
void fatalTypeError(SourceLocation const& _location, std::string const& _description); void fatalTypeError(SourceLocation const& _location, std::string const& _description);
void docstringParsingError(std::string const& _location); void docstringParsingError(std::string const& _description);
ErrorList const& errors() const; ErrorList const& errors() const;

View File

@ -262,7 +262,7 @@ protected:
void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0); void sendMessage(bytes const& _data, bool _isCreation, u256 const& _value = 0);
void sendEther(Address const& _to, u256 const& _value); void sendEther(Address const& _to, u256 const& _value);
size_t currentTimestamp(); size_t currentTimestamp();
size_t blockTimestamp(u256 number); size_t blockTimestamp(u256 _number);
/// @returns the (potentially newly created) _ith address. /// @returns the (potentially newly created) _ith address.
Address account(size_t _i); Address account(size_t _i);

View File

@ -107,7 +107,7 @@ public:
Json::Value eth_getBlockByNumber(std::string const& _blockNumber, bool _fullObjects); Json::Value eth_getBlockByNumber(std::string const& _blockNumber, bool _fullObjects);
std::string eth_call(TransactionData const& _td, std::string const& _blockNumber); std::string eth_call(TransactionData const& _td, std::string const& _blockNumber);
TransactionReceipt eth_getTransactionReceipt(std::string const& _transactionHash); TransactionReceipt eth_getTransactionReceipt(std::string const& _transactionHash);
std::string eth_sendTransaction(TransactionData const& _transactionData); std::string eth_sendTransaction(TransactionData const& _td);
std::string eth_sendTransaction(std::string const& _transaction); std::string eth_sendTransaction(std::string const& _transaction);
std::string eth_getBalance(std::string const& _address, std::string const& _blockNumber); std::string eth_getBalance(std::string const& _address, std::string const& _blockNumber);
std::string eth_getStorageRoot(std::string const& _address, std::string const& _blockNumber); std::string eth_getStorageRoot(std::string const& _address, std::string const& _blockNumber);