aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-21 22:42:17 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-22 17:51:46 +0800
commit2a5772cff7d03de0d02c5358a6a6755e8f802697 (patch)
treea617c912a51e289b00f2c71f2754d15d451c3bb4 /libsolidity/parsing
parent3cf2426e1a2975a60176cb46040fccfbc182d771 (diff)
downloaddexon-solidity-2a5772cff7d03de0d02c5358a6a6755e8f802697.tar.gz
dexon-solidity-2a5772cff7d03de0d02c5358a6a6755e8f802697.tar.zst
dexon-solidity-2a5772cff7d03de0d02c5358a6a6755e8f802697.zip
Mark appropriate constructors explicit
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r--libsolidity/parsing/Parser.cpp4
-rw-r--r--libsolidity/parsing/Parser.h2
-rw-r--r--libsolidity/parsing/ParserBase.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index d3a6aa45..7455cbca 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -40,7 +40,7 @@ namespace solidity
class Parser::ASTNodeFactory
{
public:
- ASTNodeFactory(Parser const& _parser):
+ explicit ASTNodeFactory(Parser const& _parser):
m_parser(_parser), m_location(_parser.position(), -1, _parser.sourceName()) {}
ASTNodeFactory(Parser const& _parser, ASTPointer<ASTNode> const& _childNode):
m_parser(_parser), m_location(_childNode->location()) {}
@@ -69,7 +69,7 @@ private:
class Parser::RecursionGuard
{
public:
- RecursionGuard(Parser& _parser):
+ explicit RecursionGuard(Parser& _parser):
m_parser(_parser)
{
m_parser.increaseRecursionDepth();
diff --git a/libsolidity/parsing/Parser.h b/libsolidity/parsing/Parser.h
index 5e6f3ef6..0f74880c 100644
--- a/libsolidity/parsing/Parser.h
+++ b/libsolidity/parsing/Parser.h
@@ -35,7 +35,7 @@ class Scanner;
class Parser: public ParserBase
{
public:
- Parser(ErrorReporter& _errorReporter): ParserBase(_errorReporter) {}
+ explicit Parser(ErrorReporter& _errorReporter): ParserBase(_errorReporter) {}
ASTPointer<SourceUnit> parse(std::shared_ptr<Scanner> const& _scanner);
diff --git a/libsolidity/parsing/ParserBase.h b/libsolidity/parsing/ParserBase.h
index 5b03ab5e..48733fc1 100644
--- a/libsolidity/parsing/ParserBase.h
+++ b/libsolidity/parsing/ParserBase.h
@@ -36,7 +36,7 @@ class Scanner;
class ParserBase
{
public:
- ParserBase(ErrorReporter& errorReporter): m_errorReporter(errorReporter) {}
+ explicit ParserBase(ErrorReporter& errorReporter): m_errorReporter(errorReporter) {}
std::shared_ptr<std::string const> const& sourceName() const;