From 4def812b67db5c0d04bac9b04bda978aa9eabb3b Mon Sep 17 00:00:00 2001 From: fvbommel Date: Wed, 26 Feb 2025 08:08:53 +0100 Subject: [PATCH] Fix typos in operator%= These should probably use % instead of / :wink: --- include/lefticus/tools/non_promoting_ints.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lefticus/tools/non_promoting_ints.hpp b/include/lefticus/tools/non_promoting_ints.hpp index 5b07f0d..7e49ead 100644 --- a/include/lefticus/tools/non_promoting_ints.hpp +++ b/include/lefticus/tools/non_promoting_ints.hpp @@ -179,7 +179,7 @@ template struct int_np constexpr int_np &operator%=(const std::integral auto rhs) &noexcept { - value = static_cast(value / rhs); + value = static_cast(value % rhs); return *this; } @@ -226,7 +226,7 @@ template struct int_np constexpr int_np &operator%=(const int_np rhs) &noexcept { - value = static_cast(value / rhs.value); + value = static_cast(value % rhs.value); return *this; }