From fe3ad48840e634eaf89f88f7b5d33d6573d5fc30 Mon Sep 17 00:00:00 2001 From: Miles Kent Date: Sun, 29 Sep 2024 15:28:00 -0400 Subject: [PATCH] variable ctrlr len --- test/test_systems/tc_mux_v2_testing.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/test_systems/tc_mux_v2_testing.h b/test/test_systems/tc_mux_v2_testing.h index af92ac4d..ae79949f 100644 --- a/test/test_systems/tc_mux_v2_testing.h +++ b/test/test_systems/tc_mux_v2_testing.h @@ -285,11 +285,10 @@ TEST(TorqueControllerMuxTesting, test_null_pointer_error_state) template void test_with_n_controllers() { SharedCarState_s state({}, {}, {}, {}, {}, {}); - std::array controller_instances; // Use std::array instead of std::vector - std::array controller_ptrs; // Use std::array for pointers - std::array error_flags{}; // Default-initialize to false + std::array controller_instances; + std::array controller_ptrs; + std::array error_flags{}; - // Fill the controller pointer array for (int i = 0; i < num_controllers; ++i) { controller_ptrs[i] = static_cast(&controller_instances[i]); }