diff options
author | Christian Parpart <christian@ethereum.org> | 2018-12-12 21:51:22 +0800 |
---|---|---|
committer | Christian Parpart <christian@ethereum.org> | 2018-12-19 18:26:42 +0800 |
commit | 62fe57479e7d8949e4ed2e0efb31238d5d8d6d0a (patch) | |
tree | c2592dc9a8a1abae524717c0d081e51bf1ed3c24 /libsolidity/parsing/Parser.h | |
parent | d10bae245ed441314c3bd6ecc74b2a1f3d060d12 (diff) | |
download | dexon-solidity-62fe57479e7d8949e4ed2e0efb31238d5d8d6d0a.tar.gz dexon-solidity-62fe57479e7d8949e4ed2e0efb31238d5d8d6d0a.tar.zst dexon-solidity-62fe57479e7d8949e4ed2e0efb31238d5d8d6d0a.zip |
make use of C++ `= default` constructor declarations as well as more non-static member initialization syntax.
Diffstat (limited to 'libsolidity/parsing/Parser.h')
-rw-r--r-- | libsolidity/parsing/Parser.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libsolidity/parsing/Parser.h b/libsolidity/parsing/Parser.h index bf02c626..b8d0e9a8 100644 --- a/libsolidity/parsing/Parser.h +++ b/libsolidity/parsing/Parser.h @@ -47,7 +47,10 @@ private: struct VarDeclParserOptions { + // This is actually not needed, but due to a defect in the C++ standard, we have to. + // https://stackoverflow.com/questions/17430377 VarDeclParserOptions() {} + bool allowVar = false; bool isStateVariable = false; bool allowIndexed = false; @@ -85,7 +88,7 @@ private: ASTPointer<EnumDefinition> parseEnumDefinition(); ASTPointer<EnumValue> parseEnumValue(); ASTPointer<VariableDeclaration> parseVariableDeclaration( - VarDeclParserOptions const& _options = VarDeclParserOptions(), + VarDeclParserOptions const& _options = {}, ASTPointer<TypeName> const& _lookAheadArrayType = ASTPointer<TypeName>() ); ASTPointer<ModifierDefinition> parseModifierDefinition(); @@ -99,7 +102,7 @@ private: ASTPointer<FunctionTypeName> parseFunctionType(); ASTPointer<Mapping> parseMapping(); ASTPointer<ParameterList> parseParameterList( - VarDeclParserOptions const& _options, + VarDeclParserOptions const& _options = {}, bool _allowEmpty = true ); ASTPointer<Block> parseBlock(ASTPointer<ASTString> const& _docString = {}); |