From 535b68bb8c5023cecd0bb1fd645bed9ab9488b04 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 22 Apr 2020 22:50:36 +0200 Subject: [PATCH] Return GetRandomEngine not by const, so we can actually use it --- src/Random.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Random.hpp b/src/Random.hpp index 943de7a..703ba25 100644 --- a/src/Random.hpp +++ b/src/Random.hpp @@ -24,7 +24,7 @@ namespace Arbutils { explicit inline constexpr BaseRandom(uint_fast32_t seed) noexcept : _seed(seed), _rng(seed), _distribution(0.0, 1.0){}; - inline const RandomT& GetRandomEngine() const noexcept { return _rng; } + inline RandomT& GetRandomEngine() const noexcept { return _rng; } /// Gets a random float between 0.0 and 1.0. [[nodiscard]] inline constexpr float GetFloat() noexcept { return static_cast(GetDouble()); }