From 581cd68fcf5c24b5c09137a47c52d87e636cbb51 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 16 Mar 2015 14:45:11 +0100 Subject: [PATCH] restyleing removed unnecessary check --- libsolidity/AST.h | 17 +++++++++-------- libsolidity/Parser.cpp | 3 --- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/libsolidity/AST.h b/libsolidity/AST.h index bedba396d..f5f6a3f38 100644 --- a/libsolidity/AST.h +++ b/libsolidity/AST.h @@ -443,14 +443,15 @@ class VariableDeclaration: public Declaration { public: VariableDeclaration( - SourceLocation const& _location, - ASTPointer const& _type, - ASTPointer const& _name, - ASTPointer _value, - Visibility _visibility, - bool _isStateVar = false, - bool _isIndexed = false, - bool _isConstant = false): + SourceLocation const& _location, + ASTPointer const& _type, + ASTPointer const& _name, + ASTPointer _value, + Visibility _visibility, + bool _isStateVar = false, + bool _isIndexed = false, + bool _isConstant = false + ): Declaration(_location, _name, _visibility), m_typeName(_type), m_value(_value), diff --git a/libsolidity/Parser.cpp b/libsolidity/Parser.cpp index 9e299215c..459a34bd0 100644 --- a/libsolidity/Parser.cpp +++ b/libsolidity/Parser.cpp @@ -330,9 +330,6 @@ ASTPointer Parser::parseVariableDeclaration( } if (token == Token::Const) { - solAssert(_options.isStateVariable, ""); - if (m_scanner->peekNextToken() != Token::Identifier && !Token::isElementaryTypeName(m_scanner->peekNextToken())) - BOOST_THROW_EXCEPTION(createParserError("Invalid use of \"constant\" specifier")); isDeclaredConst = true; m_scanner->next(); }