aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2014-12-11 00:19:01 +0800
committerchriseth <c@ethdev.com>2014-12-11 00:19:01 +0800
commit3c377f77bbe75e65159e79a61696ba906ac22bda (patch)
tree84dc67e67200c4f7deccda8504f0c9294d071890 /Types.h
parente8b7d266641175039d40c344449409a60527156e (diff)
parent9e120d45857506b2f448c2c18a688ff05b19009b (diff)
downloaddexon-solidity-3c377f77bbe75e65159e79a61696ba906ac22bda.tar.gz
dexon-solidity-3c377f77bbe75e65159e79a61696ba906ac22bda.tar.zst
dexon-solidity-3c377f77bbe75e65159e79a61696ba906ac22bda.zip
Merge pull request #577 from chriseth/sol_constCleanup
Solidity const cleanup
Diffstat (limited to 'Types.h')
-rw-r--r--Types.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/Types.h b/Types.h
index 8e2f4803..887a1ee1 100644
--- a/Types.h
+++ b/Types.h
@@ -80,15 +80,15 @@ public:
///@{
///@name Factory functions
/// Factory functions that convert an AST @ref TypeName to a Type.
- static std::shared_ptr<Type> fromElementaryTypeName(Token::Value _typeToken);
- static std::shared_ptr<Type> fromUserDefinedTypeName(UserDefinedTypeName const& _typeName);
- static std::shared_ptr<Type> fromMapping(Mapping const& _typeName);
- static std::shared_ptr<Type> fromFunction(FunctionDefinition const& _function);
+ static std::shared_ptr<Type const> fromElementaryTypeName(Token::Value _typeToken);
+ static std::shared_ptr<Type const> fromUserDefinedTypeName(UserDefinedTypeName const& _typeName);
+ static std::shared_ptr<Type const> fromMapping(Mapping const& _typeName);
+ static std::shared_ptr<Type const> fromFunction(FunctionDefinition const& _function);
/// @}
/// Auto-detect the proper type for a literal. @returns an empty pointer if the literal does
/// not fit any type.
- static std::shared_ptr<Type> forLiteral(Literal const& _literal);
+ static std::shared_ptr<Type const> forLiteral(Literal const& _literal);
virtual Category getCategory() const = 0;
virtual bool isImplicitlyConvertibleTo(Type const& _other) const { return *this == _other; }
@@ -148,7 +148,7 @@ public:
/// @returns the smallest integer type for the given literal or an empty pointer
/// if no type fits.
- static std::shared_ptr<IntegerType> smallestTypeForLiteral(std::string const& _literal);
+ static std::shared_ptr<IntegerType const> smallestTypeForLiteral(std::string const& _literal);
explicit IntegerType(int _bits, Modifier _modifier = Modifier::UNSIGNED);
@@ -286,7 +286,7 @@ public:
virtual bool canLiveOutsideStorage() const override { return false; }
virtual unsigned getSizeOnStack() const override;
- Location getLocation() const { return m_location; }
+ Location const& getLocation() const { return m_location; }
private:
TypePointers m_parameterTypes;