aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parser.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-27 19:38:15 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-27 19:38:15 -0800
commit10f3ea0008a4563c2baa4f29954c285d2d53d7dc (patch)
tree8aedadea55a31de188be16a1ec140cdbc76adba5 /src/parser.h
parent88a785e32117081b91b813ac6b5437deb33ef0f7 (diff)
Mark a bunch of constructors as explicit
This prevents undesired implicit conversions
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser.h b/src/parser.h
index 1b2bad1b..db35471b 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -85,7 +85,7 @@ struct block_t
{
protected:
/** Protected constructor. Use one of the subclasses below. */
- block_t(block_type_t t);
+ explicit block_t(block_type_t t);
private:
const block_type_t block_type; /**< Type of block. */
@@ -134,7 +134,7 @@ struct if_block_t : public block_t
struct event_block_t : public block_t
{
event_t const event;
- event_block_t(const event_t &evt);
+ explicit event_block_t(const event_t &evt);
};
struct function_block_t : public block_t
@@ -147,7 +147,7 @@ struct function_block_t : public block_t
struct source_block_t : public block_t
{
const wchar_t * const source_file;
- source_block_t(const wchar_t *src);
+ explicit source_block_t(const wchar_t *src);
};
struct for_block_t : public block_t
@@ -172,7 +172,7 @@ struct fake_block_t : public block_t
struct scope_block_t : public block_t
{
- scope_block_t(block_type_t type); //must be BEGIN, TOP or SUBST
+ explicit scope_block_t(block_type_t type); //must be BEGIN, TOP or SUBST
};
struct breakpoint_block_t : public block_t