From feb4b0363e1d0ab17462d21f646d92c5ee946671 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 6 Feb 2020 16:59:41 +0100 Subject: [PATCH 1/1] Add "explicit". --- include/xbt/random.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xbt/random.hpp b/include/xbt/random.hpp index 8175c69ac5..26492e2ad6 100644 --- a/include/xbt/random.hpp +++ b/include/xbt/random.hpp @@ -25,7 +25,7 @@ public: /** @brief Build a new random number generator with default seed */ Random() = default; /** @brief Build a new random number generator with given seed */ - Random(int seed) : mt19937_gen(seed) {} + explicit Random(int seed) : mt19937_gen(seed) {} virtual ~Random() = default; @@ -73,7 +73,7 @@ public: class XBT_PUBLIC StdRandom : public Random { public: StdRandom() = default; - StdRandom(int seed) : Random(seed) {} + explicit StdRandom(int seed) : Random(seed) {} int uniform_int(int min, int max) override; double uniform_real(double min, double max) override; @@ -88,7 +88,7 @@ public: class XBT_PUBLIC XbtRandom : public Random { public: XbtRandom() = default; - XbtRandom(int seed) : Random(seed) {} + explicit XbtRandom(int seed) : Random(seed) {} int uniform_int(int min, int max) override; double uniform_real(double min, double max) override; -- 2.20.1