From: Romain Forlot Date: Wed, 8 Mar 2017 22:49:12 +0000 (+0100) Subject: Use static method now as they are all static. No need X-Git-Tag: 5.0.2~524 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=fa0d98395db7e0a09160514758a990fef97f7252;p=apps%2Fagl-service-can-low-level.git Use static method now as they are all static. No need to instanciate an object to decode now. Change-Id: Id9bf378642ad66b7b4f39d909678ecc5ebb756cc Signed-off-by: Romain Forlot --- diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp index 4416452b..06d3d89c 100644 --- a/src/can/can-bus.cpp +++ b/src/can/can-bus.cpp @@ -70,8 +70,6 @@ void can_bus_t::can_decode_message() openxc_VehicleMessage vehicle_message; openxc_DynamicField search_key, decoded_message; - decoder_t decoder; - while(is_decoding_) { std::unique_lock can_message_lock(can_message_mutex_); @@ -96,7 +94,7 @@ void can_bus_t::can_decode_message() DEBUG(binder_interface, "Nb elt matched string: %d", (int)s.count(std::string(sig.generic_name)));*/ if( s.find(sig->generic_name) != s.end() && afb_event_is_valid(s[sig->generic_name])) { - decoded_message = decoder.translateSignal(*sig, can_message, get_can_signals()); + decoded_message = decoder_t::translateSignal(*sig, can_message, get_can_signals()); openxc_SimpleMessage s_message = build_SimpleMessage(sig->generic_name, decoded_message); vehicle_message = build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type::openxc_DynamicField_Type_NUM, s_message);