From a91546d8a5491fff2f0bb0e1dbeee830893202c4 Mon Sep 17 00:00:00 2001 From: William JCM Date: Sun, 20 Jun 2021 13:54:35 +0200 Subject: [PATCH] Mass: make the constructor explicit. Implicit initialisation from a std::string could be dangerous, so, let's avoid that. --- src/Mass/Mass.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mass/Mass.h b/src/Mass/Mass.h index eed4138..e05a47c 100644 --- a/src/Mass/Mass.h +++ b/src/Mass/Mass.h @@ -24,7 +24,7 @@ enum class MassState : std::uint8_t { class Mass { public: - Mass(const std::string& filename); + explicit Mass(const std::string& filename); Mass(const Mass&) = delete; Mass& operator=(const Mass&) = delete;