diff options
author | arades79 <scravers@protonmail.com> | 2023-02-11 13:28:03 -0500 |
---|---|---|
committer | arades79 <scravers@protonmail.com> | 2023-02-14 12:33:11 -0500 |
commit | 45e13b03f372230dbf780f3fa87dd88f388af605 (patch) | |
tree | 555593e7e5016b6ba2a777d7417ada244abce458 /src/yuzu/main.cpp | |
parent | 5f5a6e4b2e541e86c0bfdb99e3acfbbebe89a5d3 (diff) |
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 62dfc526a..68abde028 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -219,7 +219,7 @@ static void LogRuntimes() { #ifdef _MSC_VER // It is possible that the name of the dll will change. // vcruntime140.dll is for 2015 and onwards - constexpr char runtime_dll_name[] = "vcruntime140.dll"; + constexpr static char runtime_dll_name[] = "vcruntime140.dll"; UINT sz = GetFileVersionInfoSizeA(runtime_dll_name, nullptr); bool runtime_version_inspection_worked = false; if (sz > 0) { @@ -4490,8 +4490,8 @@ static void SetHighDPIAttributes() { // Recommended minimum width and height for proper window fit. // Any screen with a lower resolution than this will still have a scale of 1. - constexpr float minimum_width = 1350.0f; - constexpr float minimum_height = 900.0f; + constexpr static float minimum_width = 1350.0f; + constexpr static float minimum_height = 900.0f; const float width_ratio = std::max(1.0f, real_width / minimum_width); const float height_ratio = std::max(1.0f, real_height / minimum_height); |