From 45e13b03f372230dbf780f3fa87dd88f388af605 Mon Sep 17 00:00:00 2001 From: arades79 Date: Sat, 11 Feb 2023 13:28:03 -0500 Subject: add static lifetime to constexpr values to force compile time evaluation where possible Signed-off-by: arades79 --- src/video_core/textures/decoders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/textures/decoders.cpp') diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 59120cd09..436f228b3 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -29,7 +29,7 @@ constexpr u32 pdep(u32 value) { template void incrpdep(u32& value) { - constexpr u32 swizzled_incr = pdep(incr_amount); + constexpr static u32 swizzled_incr = pdep(incr_amount); value = ((value | ~mask) + swizzled_incr) & mask; } -- cgit v1.2.3 From 683019878fc939b418a65e1c5d84b066596d7655 Mon Sep 17 00:00:00 2001 From: arades79 Date: Tue, 14 Feb 2023 11:13:47 -0500 Subject: remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency Signed-off-by: arades79 --- src/video_core/textures/decoders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/textures/decoders.cpp') diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 436f228b3..95bcdd37b 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -29,7 +29,7 @@ constexpr u32 pdep(u32 value) { template void incrpdep(u32& value) { - constexpr static u32 swizzled_incr = pdep(incr_amount); + static constexpr u32 swizzled_incr = pdep(incr_amount); value = ((value | ~mask) + swizzled_incr) & mask; } -- cgit v1.2.3