From fa6d02155e06bee279e017c1c844c2b546bf0d1c Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 19 May 2017 16:17:36 +0200 Subject: Adjust method signature to be more efficient. Return vector reference and doesn't return const ref. Change-Id: Ibcbc1d72e4baf1a7b8bf017d36d6d37d25312d6d Signed-off-by: Romain Forlot # Conflicts: # CAN-binder/low-can-binding/can/can-signals.hpp --- CAN-binder/low-can-binding/binding/configuration.cpp | 6 +++--- CAN-binder/low-can-binding/binding/configuration.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'CAN-binder/low-can-binding/binding') diff --git a/CAN-binder/low-can-binding/binding/configuration.cpp b/CAN-binder/low-can-binding/binding/configuration.cpp index 4898bdc..623ba78 100644 --- a/CAN-binder/low-can-binding/binding/configuration.cpp +++ b/CAN-binder/low-can-binding/binding/configuration.cpp @@ -42,7 +42,7 @@ uint8_t configuration_t::get_active_message_set() const return active_message_set_; } -const std::vector >& configuration_t::get_can_message_set() +std::vector > configuration_t::get_can_message_set() { return can_message_set_; } @@ -52,12 +52,12 @@ std::vector > configuration_t::get_all_can_signals return can_message_set_[active_message_set_]->get_all_can_signals(); } -std::vector > configuration_t::get_diagnostic_messages() +std::vector >& configuration_t::get_diagnostic_messages() { return can_message_set_[active_message_set_]->get_diagnostic_messages(); } -std::vector > configuration_t::get_can_message_definition() +std::vector >& configuration_t::get_can_message_definition() { return can_message_set_[active_message_set_]->get_can_message_definition(); } diff --git a/CAN-binder/low-can-binding/binding/configuration.hpp b/CAN-binder/low-can-binding/binding/configuration.hpp index fd66923..3ab88ee 100644 --- a/CAN-binder/low-can-binding/binding/configuration.hpp +++ b/CAN-binder/low-can-binding/binding/configuration.hpp @@ -65,15 +65,15 @@ class configuration_t uint8_t get_active_message_set() const; - const std::vector >& get_can_message_set(); + std::vector > get_can_message_set(); std::vector > get_all_can_signals(); - std::vector > get_diagnostic_messages(); + std::vector >& get_diagnostic_messages(); const std::vector& get_signals_prefix() const; - std::vector > get_can_message_definition(); + std::vector >& get_can_message_definition(); uint32_t get_signal_id(diagnostic_message_t& sig) const; -- cgit 1.2.3-korg