From 0cc652e72eedd4cbdc0d035e05843384af99b5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trung=20L=C3=AA?= Date: Wed, 5 May 2021 11:00:04 +1000 Subject: [PATCH] Add constexpr to PiRngWrapper min() and max() Fixes #5170 --- src/Intro.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Intro.cpp b/src/Intro.cpp index 7432e6165..d926c082c 100644 --- a/src/Intro.cpp +++ b/src/Intro.cpp @@ -18,8 +18,8 @@ public: PiRngWrapper(size_t maxValue) : maxVal(maxValue) {} typedef unsigned int result_type; - static unsigned int min() { return 0; } - static unsigned int max() { return std::numeric_limits::max(); } + static constexpr unsigned int min() { return 0; } + static constexpr unsigned int max() { return std::numeric_limits::max(); } unsigned int operator()() { return Pi::rng.Int32(maxVal);