aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-11-24 23:34:02 +0800
committerchriseth <c@ethdev.com>2015-11-26 20:44:09 +0800
commit6a2a946200f3806d5daefa0220002ae934ea0ee3 (patch)
treee692b9833551b220eebabb3b11476819977d1bff /libsolidity/analysis
parent879844dd0a9137602373c8f67f283a5895913732 (diff)
downloaddexon-solidity-6a2a946200f3806d5daefa0220002ae934ea0ee3.tar.gz
dexon-solidity-6a2a946200f3806d5daefa0220002ae934ea0ee3.tar.zst
dexon-solidity-6a2a946200f3806d5daefa0220002ae934ea0ee3.zip
Make some functions const.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp4
-rw-r--r--libsolidity/analysis/TypeChecker.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 5623da37..42fdad91 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1311,13 +1311,13 @@ bool TypeChecker::contractDependenciesAreCyclic(
return false;
}
-Declaration const& TypeChecker::dereference(Identifier const& _identifier)
+Declaration const& TypeChecker::dereference(Identifier const& _identifier) const
{
solAssert(!!_identifier.annotation().referencedDeclaration, "Declaration not stored.");
return *_identifier.annotation().referencedDeclaration;
}
-Declaration const& TypeChecker::dereference(UserDefinedTypeName const& _typeName)
+Declaration const& TypeChecker::dereference(UserDefinedTypeName const& _typeName) const
{
solAssert(!!_typeName.annotation().referencedDeclaration, "Declaration not stored.");
return *_typeName.annotation().referencedDeclaration;
diff --git a/libsolidity/analysis/TypeChecker.h b/libsolidity/analysis/TypeChecker.h
index eb396a8c..2295bc22 100644
--- a/libsolidity/analysis/TypeChecker.h
+++ b/libsolidity/analysis/TypeChecker.h
@@ -107,9 +107,9 @@ private:
) const;
/// @returns the referenced declaration and throws on error.
- Declaration const& dereference(Identifier const& _identifier);
+ Declaration const& dereference(Identifier const& _identifier) const;
/// @returns the referenced declaration and throws on error.
- Declaration const& dereference(UserDefinedTypeName const& _typeName);
+ Declaration const& dereference(UserDefinedTypeName const& _typeName) const;
/// Runs type checks on @a _expression to infer its type and then checks that it is implicitly
/// convertible to @a _expectedType.