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/query_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core/query_cache.h') diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index 00ce53e3e..c9b482bbe 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h @@ -281,7 +281,7 @@ public: explicit HostCounterBase(std::shared_ptr dependency_) : dependency{std::move(dependency_)}, depth{dependency ? (dependency->Depth() + 1) : 0} { // Avoid nesting too many dependencies to avoid a stack overflow when these are deleted. - constexpr u64 depth_threshold = 96; + constexpr static u64 depth_threshold = 96; if (depth > depth_threshold) { depth = 0; base_result = dependency->Query(); -- cgit v1.2.3