Add constexpr to PiRngWrapper min() and max()

Fixes #5170
master
Trung Lê 2021-05-05 11:00:04 +10:00 committed by Webster Sheets
parent a07ac89cee
commit 0cc652e72e
1 changed files with 2 additions and 2 deletions

View File

@ -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<uint32_t>::max(); }
static constexpr unsigned int min() { return 0; }
static constexpr unsigned int max() { return std::numeric_limits<uint32_t>::max(); }
unsigned int operator()()
{
return Pi::rng.Int32(maxVal);