From 9d0291952255969770e4978a0fe9e7e4839359c8 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 31 Oct 2021 20:39:47 +0200 Subject: [PATCH] Make boolean conversion operators explicit --- source/input.h | 2 +- source/parser.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/input.h b/source/input.h index d30abd6..6163345 100644 --- a/source/input.h +++ b/source/input.h @@ -23,7 +23,7 @@ public: int get(); int peek(); unsigned get_line_number() const { return line; } - operator bool() const; + explicit operator bool() const; }; } // namespace DataFile diff --git a/source/parser.h b/source/parser.h index c7c10f1..c15fee8 100644 --- a/source/parser.h +++ b/source/parser.h @@ -51,7 +51,7 @@ public: statement's signature. */ bool parse_and_load(unsigned, Loader &, const LoaderAction &); - operator bool() const { return good && in; } + explicit operator bool() const { return good && in; } }; } // namespace DataFile -- 2.43.0