From 6a2a946200f3806d5daefa0220002ae934ea0ee3 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 24 Nov 2015 16:34:02 +0100 Subject: Make some functions const. --- libsolidity/analysis/TypeChecker.cpp | 4 ++-- libsolidity/analysis/TypeChecker.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libsolidity') 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. -- cgit