diff options
| author | 2022-10-21 02:34:06 -0400 | |
|---|---|---|
| committer | 2022-10-22 15:02:04 -0400 | |
| commit | bad30259515d0e3ce438ae8d6236216e393f463e (patch) | |
| tree | d4d4a30c281e1868d9bf62924a819f08ed36a4dc | |
| parent | CMakeLists: Treat MSVC warnings as errors (diff) | |
| download | yuzu-bad30259515d0e3ce438ae8d6236216e393f463e.tar.gz yuzu-bad30259515d0e3ce438ae8d6236216e393f463e.tar.xz yuzu-bad30259515d0e3ce438ae8d6236216e393f463e.zip | |
decoders: Use 2's complement instead of unary -
Resolves C4146 on MSVC
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 52d067a2d..fd1a4b987 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -21,7 +21,7 @@ constexpr u32 pdep(u32 value) { | |||
| 21 | u32 m = mask; | 21 | u32 m = mask; |
| 22 | for (u32 bit = 1; m; bit += bit) { | 22 | for (u32 bit = 1; m; bit += bit) { |
| 23 | if (value & bit) | 23 | if (value & bit) |
| 24 | result |= m & -m; | 24 | result |= m & (~m + 1); |
| 25 | m &= m - 1; | 25 | m &= m - 1; |
| 26 | } | 26 | } |
| 27 | return result; | 27 | return result; |