diff options
author | LianaHus <liana@ethdev.com> | 2015-09-01 00:44:29 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-09-08 19:12:00 +0800 |
commit | 1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4 (patch) | |
tree | 6ecb1323bec51a67a53d63bfd250f4ccfcee926c /libsolidity/DeclarationContainer.cpp | |
parent | 6f4a39c183a905b8e07da59c17bfd25c2febbf7f (diff) | |
download | dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.gz dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.bz2 dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.lz dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.xz dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.tar.zst dexon-solidity-1b5e6fc9e76ad3cf30e6e7bfc0e868dbb5267ff4.zip |
renamed getter functions
Diffstat (limited to 'libsolidity/DeclarationContainer.cpp')
-rw-r--r-- | libsolidity/DeclarationContainer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libsolidity/DeclarationContainer.cpp b/libsolidity/DeclarationContainer.cpp index 3e23d93b..dbe9715d 100644 --- a/libsolidity/DeclarationContainer.cpp +++ b/libsolidity/DeclarationContainer.cpp @@ -30,13 +30,13 @@ using namespace dev::solidity; Declaration const* DeclarationContainer::conflictingDeclaration(Declaration const& _declaration) const { - ASTString const& name(_declaration.getName()); - solAssert(!name.empty(), ""); + ASTString const& declarationName(_declaration.name()); + solAssert(!declarationName.empty(), ""); vector<Declaration const*> declarations; - if (m_declarations.count(name)) - declarations += m_declarations.at(name); - if (m_invisibleDeclarations.count(name)) - declarations += m_invisibleDeclarations.at(name); + if (m_declarations.count(declarationName)) + declarations += m_declarations.at(declarationName); + if (m_invisibleDeclarations.count(declarationName)) + declarations += m_invisibleDeclarations.at(declarationName); if (dynamic_cast<FunctionDefinition const*>(&_declaration)) { @@ -53,23 +53,23 @@ Declaration const* DeclarationContainer::conflictingDeclaration(Declaration cons bool DeclarationContainer::registerDeclaration(Declaration const& _declaration, bool _invisible, bool _update) { - ASTString const& name(_declaration.getName()); - if (name.empty()) + ASTString const& declarationName(_declaration.name()); + if (declarationName.empty()) return true; if (_update) { solAssert(!dynamic_cast<FunctionDefinition const*>(&_declaration), "Attempt to update function definition."); - m_declarations.erase(name); - m_invisibleDeclarations.erase(name); + m_declarations.erase(declarationName); + m_invisibleDeclarations.erase(declarationName); } else if (conflictingDeclaration(_declaration)) return false; if (_invisible) - m_invisibleDeclarations[name].push_back(&_declaration); + m_invisibleDeclarations[declarationName].push_back(&_declaration); else - m_declarations[name].push_back(&_declaration); + m_declarations[declarationName].push_back(&_declaration); return true; } |