From b610be4882ca77defb73e35eda93996ca790f9f4 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 29 Nov 2018 18:23:58 +0100 Subject: [PATCH] Rename functions. --- libsolidity/analysis/ContractLevelChecker.cpp | 20 +++++++++---------- libsolidity/analysis/ContractLevelChecker.h | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libsolidity/analysis/ContractLevelChecker.cpp b/libsolidity/analysis/ContractLevelChecker.cpp index f41e569fe..0ddb198f5 100644 --- a/libsolidity/analysis/ContractLevelChecker.cpp +++ b/libsolidity/analysis/ContractLevelChecker.cpp @@ -35,16 +35,16 @@ using namespace dev::solidity; bool ContractLevelChecker::check(ContractDefinition const& _contract) { - checkContractDuplicateFunctions(_contract); - checkContractDuplicateEvents(_contract); - checkContractIllegalOverrides(_contract); - checkContractAbstractFunctions(_contract); - checkContractBaseConstructorArguments(_contract); + checkDuplicateFunctions(_contract); + checkDuplicateEvents(_contract); + checkIllegalOverrides(_contract); + checkAbstractFunctions(_contract); + checkBaseConstructorArguments(_contract); return Error::containsOnlyWarnings(m_errorReporter.errors()); } -void ContractLevelChecker::checkContractDuplicateFunctions(ContractDefinition const& _contract) +void ContractLevelChecker::checkDuplicateFunctions(ContractDefinition const& _contract) { /// Checks that two functions with the same name defined in this contract have different /// argument types and that there is at most one constructor. @@ -81,7 +81,7 @@ void ContractLevelChecker::checkContractDuplicateFunctions(ContractDefinition co findDuplicateDefinitions(functions, "Function with same name and arguments defined twice."); } -void ContractLevelChecker::checkContractDuplicateEvents(ContractDefinition const& _contract) +void ContractLevelChecker::checkDuplicateEvents(ContractDefinition const& _contract) { /// Checks that two events with the same name defined in this contract have different /// argument types @@ -126,7 +126,7 @@ void ContractLevelChecker::findDuplicateDefinitions(map> const } } -void ContractLevelChecker::checkContractIllegalOverrides(ContractDefinition const& _contract) +void ContractLevelChecker::checkIllegalOverrides(ContractDefinition const& _contract) { // TODO unify this at a later point. for this we need to put the constness and the access specifier // into the types @@ -207,7 +207,7 @@ void ContractLevelChecker::overrideError(FunctionDefinition const& function, Fun ); } -void ContractLevelChecker::checkContractAbstractFunctions(ContractDefinition const& _contract) +void ContractLevelChecker::checkAbstractFunctions(ContractDefinition const& _contract) { // Mapping from name to function definition (exactly one per argument type equality class) and // flag to indicate whether it is fully implemented. @@ -251,7 +251,7 @@ void ContractLevelChecker::checkContractAbstractFunctions(ContractDefinition con } -void ContractLevelChecker::checkContractBaseConstructorArguments(ContractDefinition const& _contract) +void ContractLevelChecker::checkBaseConstructorArguments(ContractDefinition const& _contract) { vector const& bases = _contract.annotation().linearizedBaseContracts; diff --git a/libsolidity/analysis/ContractLevelChecker.h b/libsolidity/analysis/ContractLevelChecker.h index fc0d69729..eb8807e96 100644 --- a/libsolidity/analysis/ContractLevelChecker.h +++ b/libsolidity/analysis/ContractLevelChecker.h @@ -54,17 +54,17 @@ public: private: /// Checks that two functions defined in this contract with the same name have different /// arguments and that there is at most one constructor. - void checkContractDuplicateFunctions(ContractDefinition const& _contract); - void checkContractDuplicateEvents(ContractDefinition const& _contract); + void checkDuplicateFunctions(ContractDefinition const& _contract); + void checkDuplicateEvents(ContractDefinition const& _contract); template void findDuplicateDefinitions(std::map> const& _definitions, std::string _message); - void checkContractIllegalOverrides(ContractDefinition const& _contract); + void checkIllegalOverrides(ContractDefinition const& _contract); /// Reports a type error with an appropriate message if overridden function signature differs. /// Also stores the direct super function in the AST annotations. void checkFunctionOverride(FunctionDefinition const& function, FunctionDefinition const& super); void overrideError(FunctionDefinition const& function, FunctionDefinition const& super, std::string message); - void checkContractAbstractFunctions(ContractDefinition const& _contract); - void checkContractBaseConstructorArguments(ContractDefinition const& _contract); + void checkAbstractFunctions(ContractDefinition const& _contract); + void checkBaseConstructorArguments(ContractDefinition const& _contract); void annotateBaseConstructorArguments( ContractDefinition const& _currentContract, FunctionDefinition const* _baseConstructor,