Add const.

This commit is contained in:
chriseth 2015-10-06 14:43:09 +02:00
parent 99351aebe0
commit 55af63e463
2 changed files with 4 additions and 4 deletions

View File

@ -125,12 +125,12 @@ vector<Declaration const*> NameAndTypeResolver::resolveName(ASTString const& _na
return iterator->second.resolveName(_name, false); return iterator->second.resolveName(_name, false);
} }
vector<Declaration const*> NameAndTypeResolver::nameFromCurrentScope(ASTString const& _name, bool _recursive) vector<Declaration const*> NameAndTypeResolver::nameFromCurrentScope(ASTString const& _name, bool _recursive) const
{ {
return m_currentScope->resolveName(_name, _recursive); return m_currentScope->resolveName(_name, _recursive);
} }
Declaration const* NameAndTypeResolver::pathFromCurrentScope(vector<ASTString> const& _path, bool _recursive) Declaration const* NameAndTypeResolver::pathFromCurrentScope(vector<ASTString> const& _path, bool _recursive) const
{ {
solAssert(!_path.empty(), ""); solAssert(!_path.empty(), "");
vector<Declaration const*> candidates = m_currentScope->resolveName(_path.front(), _recursive); vector<Declaration const*> candidates = m_currentScope->resolveName(_path.front(), _recursive);

View File

@ -58,12 +58,12 @@ public:
/// Resolves a name in the "current" scope. Should only be called during the initial /// Resolves a name in the "current" scope. Should only be called during the initial
/// resolving phase. /// resolving phase.
std::vector<Declaration const*> nameFromCurrentScope(ASTString const& _name, bool _recursive = true); std::vector<Declaration const*> nameFromCurrentScope(ASTString const& _name, bool _recursive = true) const;
/// Resolves a path starting from the "current" scope. Should only be called during the initial /// Resolves a path starting from the "current" scope. Should only be called during the initial
/// resolving phase. /// resolving phase.
/// @note Returns a null pointer if any component in the path was not unique or not found. /// @note Returns a null pointer if any component in the path was not unique or not found.
Declaration const* pathFromCurrentScope(std::vector<ASTString> const& _path, bool _recursive = true); Declaration const* pathFromCurrentScope(std::vector<ASTString> const& _path, bool _recursive = true) const;
/// returns the vector of declarations without repetitions /// returns the vector of declarations without repetitions
static std::vector<Declaration const*> cleanedDeclarations( static std::vector<Declaration const*> cleanedDeclarations(