summaryrefslogtreecommitdiff
path: root/src/tests
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/tests
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/tests')
-rw-r--r--src/tests/common/fibers.cpp2
-rw-r--r--src/tests/input_common/calibration_configuration_job.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/common/fibers.cpp b/src/tests/common/fibers.cpp
index ecad7583f..c0b22d0ee 100644
--- a/src/tests/common/fibers.cpp
+++ b/src/tests/common/fibers.cpp
@@ -76,7 +76,7 @@ void TestControl1::ExecuteThread(u32 id) {
76 * doing all the work required. 76 * doing all the work required.
77 */ 77 */
78TEST_CASE("Fibers::Setup", "[common]") { 78TEST_CASE("Fibers::Setup", "[common]") {
79 constexpr std::size_t num_threads = 7; 79 constexpr static std::size_t num_threads = 7;
80 TestControl1 test_control{}; 80 TestControl1 test_control{};
81 test_control.thread_fibers.resize(num_threads); 81 test_control.thread_fibers.resize(num_threads);
82 test_control.work_fibers.resize(num_threads); 82 test_control.work_fibers.resize(num_threads);
diff --git a/src/tests/input_common/calibration_configuration_job.cpp b/src/tests/input_common/calibration_configuration_job.cpp
index 516ff1b30..8d3951ee6 100644
--- a/src/tests/input_common/calibration_configuration_job.cpp
+++ b/src/tests/input_common/calibration_configuration_job.cpp
@@ -35,8 +35,8 @@ public:
35 } 35 }
36 36
37 void Run(const std::vector<InputCommon::CemuhookUDP::Response::TouchPad> touch_movement_path) { 37 void Run(const std::vector<InputCommon::CemuhookUDP::Response::TouchPad> touch_movement_path) {
38 constexpr size_t HeaderSize = sizeof(InputCommon::CemuhookUDP::Header); 38 constexpr static size_t HeaderSize = sizeof(InputCommon::CemuhookUDP::Header);
39 constexpr size_t PadDataSize = 39 constexpr static size_t PadDataSize =
40 sizeof(InputCommon::CemuhookUDP::Message<InputCommon::CemuhookUDP::Response::PadData>); 40 sizeof(InputCommon::CemuhookUDP::Message<InputCommon::CemuhookUDP::Response::PadData>);
41 41
42 REQUIRE(touch_movement_path.size() > 0); 42 REQUIRE(touch_movement_path.size() > 0);