From 10f3ea0008a4563c2baa4f29954c285d2d53d7dc Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 27 Feb 2016 19:38:15 -0800 Subject: Mark a bunch of constructors as explicit This prevents undesired implicit conversions --- src/parser.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser.h') 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 -- cgit v1.2.3