diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-06-11 20:12:29 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-06-11 20:12:29 -0600 |
| commit | 07bf05a7869c88c27912833c1db942f8fc849f4d (patch) | |
| tree | b32a11e146884bcee04ef2dd5702b45e89699424 /pkgs/force-riscv/urbg-static-constexpr-min-max.patch | |
| parent | 905a306a705fc7bf9f0d03945bfe692c530dd05e (diff) | |
pkgs: add existing derivations written for other projects
Diffstat (limited to 'pkgs/force-riscv/urbg-static-constexpr-min-max.patch')
| -rw-r--r-- | pkgs/force-riscv/urbg-static-constexpr-min-max.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/force-riscv/urbg-static-constexpr-min-max.patch b/pkgs/force-riscv/urbg-static-constexpr-min-max.patch new file mode 100644 index 0000000..a047fd0 --- /dev/null +++ b/pkgs/force-riscv/urbg-static-constexpr-min-max.patch @@ -0,0 +1,15 @@ +diff --git a/base/inc/Random.h b/base/inc/Random.h +index 6354dee..21660a9 100644 +--- a/base/inc/Random.h ++++ b/base/inc/Random.h +@@ -56,8 +56,8 @@ namespace Force { + class RandomURBG32 { + public: + typedef uint32 result_type; //!< Type define required by STL +- uint32 min() const { return 0; } //!< min function required by STL +- uint32 max() const { return MAX_UINT32; } //!< max function required by STL ++ static constexpr uint32 min() { return 0; } //!< min function required by STL ++ static constexpr uint32 max() { return MAX_UINT32; } //!< max function required by STL + uint32 operator () () const { return mpRandomInstance->Random32(min(), max()); } + + explicit RandomURBG32(const Random* randomInstance) : mpRandomInstance(randomInstance) { } //!< Constructor with pointer to a Random object provieded. |
