summaryrefslogtreecommitdiff
path: root/src/video_core/query_cache.h
diff options
context:
space:
mode:
authorGravatar arades792023-02-11 13:28:03 -0500
committerGravatar arades792023-02-14 12:33:11 -0500
commit45e13b03f372230dbf780f3fa87dd88f388af605 (patch)
tree555593e7e5016b6ba2a777d7417ada244abce458 /src/video_core/query_cache.h
parentMerge pull request #9795 from Kelebek1/biquad_fix (diff)
downloadyuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.gz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.tar.xz
yuzu-45e13b03f372230dbf780f3fa87dd88f388af605.zip
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/video_core/query_cache.h')
-rw-r--r--src/video_core/query_cache.h2
1 files changed, 1 insertions, 1 deletions
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:
281 explicit HostCounterBase(std::shared_ptr<HostCounter> dependency_) 281 explicit HostCounterBase(std::shared_ptr<HostCounter> dependency_)
282 : dependency{std::move(dependency_)}, depth{dependency ? (dependency->Depth() + 1) : 0} { 282 : dependency{std::move(dependency_)}, depth{dependency ? (dependency->Depth() + 1) : 0} {
283 // Avoid nesting too many dependencies to avoid a stack overflow when these are deleted. 283 // Avoid nesting too many dependencies to avoid a stack overflow when these are deleted.
284 constexpr u64 depth_threshold = 96; 284 constexpr static u64 depth_threshold = 96;
285 if (depth > depth_threshold) { 285 if (depth > depth_threshold) {
286 depth = 0; 286 depth = 0;
287 base_result = dependency->Query(); 287 base_result = dependency->Query();