mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make some functions const.
This commit is contained in:
parent
879844dd0a
commit
6a2a946200
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user