From 9099177556d598676e4d6322ae49d22bb2f0c59e Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 9 Mar 2017 16:11:43 +0100 Subject: Added constructor to get vector initialized with default objects initialized that can be grabed after at runtime. Don't know the impact on performance for now about maximum limit. Change-Id: I220614d479b8254ae0efda66380e96434bcbfbb2 Signed-off-by: Romain Forlot --- src/diagnostic/diagnostic-manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/diagnostic/diagnostic-manager.cpp') diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index 1feac97..2be9a05 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -19,12 +19,14 @@ #include "../configuration.hpp" #include "../low-can-binding.hpp" +#define MAX_REQUEST_ENTRIES 50 diagnostic_manager_t::diagnostic_manager_t() + : request_list_entries_(MAX_REQUEST_ENTRIES, active_diagnostic_request_t()) {} diagnostic_manager_t::diagnostic_manager_t(can_bus_dev_t& bus) - : bus_(&bus) + : bus_(&bus), request_list_entries_(MAX_REQUEST_ENTRIES, active_diagnostic_request_t()) {} bool shims_send(const uint32_t arbitration_id, const uint8_t* data, const uint8_t size) -- cgit 1.2.3-korg