From 3b55101caf70e27cb312f3f7235ed4b30ff6d849 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 9 Mar 2017 10:16:45 +0100 Subject: Fix: use of new objects and type conversion missing. Change-Id: I583ad536de619fed2be655a493299fe43cc65924 Signed-off-by: Romain Forlot --- src/utils/signals.cpp | 4 ++-- src/utils/signals.hpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/signals.cpp b/src/utils/signals.cpp index e65d35e2..7393409b 100644 --- a/src/utils/signals.cpp +++ b/src/utils/signals.cpp @@ -61,11 +61,11 @@ std::vector find_signals(const openxc_DynamicField &key) { case openxc_DynamicField_Type::openxc_DynamicField_Type_STRING: lookup_signals_by_name(key.string_value, config->get_can_signals(), found_signals_name); - lookup_signals_by_name(key.string_value, get_obd2_signals(), found_signals_name); + lookup_signals_by_name(key.string_value, config->get_obd2_signals(), found_signals_name); break; case openxc_DynamicField_Type::openxc_DynamicField_Type_NUM: lookup_signals_by_id(key.numeric_value, config->get_can_signals(), found_signals_name); - lookup_signals_by_id(key.numeric_value, get_obd2_signals(), found_signals_name); + lookup_signals_by_id(key.numeric_value, config->get_obd2_signals(), found_signals_name); break; default: ERROR(binder_interface, "find_signals: wrong openxc_DynamicField specified. Use openxc_DynamicField_Type_NUM or openxc_DynamicField_Type_STRING type only."); diff --git a/src/utils/signals.hpp b/src/utils/signals.hpp index db3a401d..fe869539 100644 --- a/src/utils/signals.hpp +++ b/src/utils/signals.hpp @@ -52,9 +52,9 @@ void lookup_signals_by_name(const std::string& key, std::vector& signals, std template void lookup_signals_by_name(const std::string& key, std::vector& signals, std::vector& found_signals_name) { - for(const T& s : signals) + for(T& s : signals) { - if(::fnmatch(key.c_str(), s.generic_name, FNM_CASEFOLD) == 0) + if(::fnmatch(key.c_str(), s.get_generic_name().c_str(), FNM_CASEFOLD) == 0) found_signals_name.push_back(s.get_generic_name()); } } @@ -74,11 +74,11 @@ void lookup_signals_by_id(const double key, std::vector& signals, std::vector template void lookup_signals_by_id(const double key, std::vector& signals, std::vector& found_signals_name) { - for(const T& s : signals) + for(T& s : signals) { if(config->get_signal_id(s) == key) { - found_signals_name.push_back(s.generic_name); + found_signals_name.push_back(s.get_generic_name()); } } } -- cgit 1.2.3-korg