aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-10-06 20:43:09 +0800
committerchriseth <c@ethdev.com>2015-10-06 20:43:09 +0800
commit55af63e4638d6552ff5fdb4f78fc582536daa43a (patch)
tree3efc58dcb6e2ed53fe5b2baeb48b2d51a621b06d
parent99351aebe0c9ebbb06e34c18ecc19bc0c87d9d54 (diff)
downloaddexon-solidity-55af63e4638d6552ff5fdb4f78fc582536daa43a.tar.gz
dexon-solidity-55af63e4638d6552ff5fdb4f78fc582536daa43a.tar.zst
dexon-solidity-55af63e4638d6552ff5fdb4f78fc582536daa43a.zip
Add const.
-rw-r--r--libsolidity/NameAndTypeResolver.cpp4
-rw-r--r--libsolidity/NameAndTypeResolver.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/NameAndTypeResolver.cpp b/libsolidity/NameAndTypeResolver.cpp
index d9f74ae1..4747542d 100644
--- a/libsolidity/NameAndTypeResolver.cpp
+++ b/libsolidity/NameAndTypeResolver.cpp
@@ -125,12 +125,12 @@ vector<Declaration const*> NameAndTypeResolver::resolveName(ASTString const& _na
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);
}
-Declaration const* NameAndTypeResolver::pathFromCurrentScope(vector<ASTString> const& _path, bool _recursive)
+Declaration const* NameAndTypeResolver::pathFromCurrentScope(vector<ASTString> const& _path, bool _recursive) const
{
solAssert(!_path.empty(), "");
vector<Declaration const*> candidates = m_currentScope->resolveName(_path.front(), _recursive);
diff --git a/libsolidity/NameAndTypeResolver.h b/libsolidity/NameAndTypeResolver.h
index 8e817a7c..f5f4c6ce 100644
--- a/libsolidity/NameAndTypeResolver.h
+++ b/libsolidity/NameAndTypeResolver.h
@@ -58,12 +58,12 @@ public:
/// Resolves a name in the "current" scope. Should only be called during the initial
/// 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
/// resolving phase.
/// @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
static std::vector<Declaration const*> cleanedDeclarations(