aco/util: fix bit_reference::operator&=
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 24.3
(cherry picked from commit 46787fc2d0
)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:
@@ -1204,7 +1204,7 @@
|
||||
"description": "aco/util: fix bit_reference::operator&=",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -793,7 +793,7 @@ template <typename T> struct bit_reference {
|
||||
|
||||
constexpr bit_reference& operator&=(bool val)
|
||||
{
|
||||
storage &= T(val) << bit;
|
||||
storage &= ~(T(!val) << bit);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user