aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast
diff options
context:
space:
mode:
authorRJ Catalano <rcatalano@macsales.com>2016-02-16 00:34:45 +0800
committerRJ Catalano <rcatalano@macsales.com>2016-02-19 01:22:58 +0800
commitd2c0712f36ce4a9148756458533a91bca1cfe44b (patch)
tree5daf3d26726205c731d697948e4764220b78b268 /libsolidity/ast
parent84f2eb461b62a2d36d6784068842b4aa0a5c220a (diff)
downloaddexon-solidity-d2c0712f36ce4a9148756458533a91bca1cfe44b.tar.gz
dexon-solidity-d2c0712f36ce4a9148756458533a91bca1cfe44b.tar.zst
dexon-solidity-d2c0712f36ce4a9148756458533a91bca1cfe44b.zip
added const correctness to extract functions in Token
optimizations added in more elegant solution created for m declaration ubuntu wants to get rid of 0 <= first statement...so I will change returnToken to token
Diffstat (limited to 'libsolidity/ast')
-rw-r--r--libsolidity/ast/Types.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index f8050898..250ec102 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -118,20 +118,20 @@ u256 const& MemberList::storageSize() const
TypePointer Type::fromElementaryTypeName(ElementaryTypeNameToken const& _type)
{
string tokenString = _type.toString();
- solAssert(Token::isElementaryTypeName(_type.returnTok()),
+ solAssert(Token::isElementaryTypeName(_type.token()),
"Expected an elementary type name but got " + tokenString);
- Token::Value token = _type.returnTok();
- unsigned int M = _type.firstNumber();
+ Token::Value token = _type.token();
+ unsigned int m = _type.firstNumber();
switch (token)
{
case Token::IntM:
- return make_shared<IntegerType>(M, IntegerType::Modifier::Signed);
+ return make_shared<IntegerType>(m, IntegerType::Modifier::Signed);
case Token::UIntM:
- return make_shared<IntegerType>(M, IntegerType::Modifier::Unsigned);
+ return make_shared<IntegerType>(m, IntegerType::Modifier::Unsigned);
case Token::BytesM:
- return make_shared<FixedBytesType>(M);
+ return make_shared<FixedBytesType>(m);
case Token::Int:
return make_shared<IntegerType>(256, IntegerType::Modifier::Signed);
case Token::UInt: