From 065a5bdef8c37f8b0466f63e48443dab31e86431 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 10 Mar 2017 16:08:06 +0100 Subject: We doesn't modify member once getted, we can use const return and const method. Change-Id: I0f7465af74b1c9a546af45a0d1eea33c93537e0c Signed-off-by: Romain Forlot --- src/can/can-signals.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/can/can-signals.cpp') diff --git a/src/can/can-signals.cpp b/src/can/can-signals.cpp index 2d2e7eaf..00b6ee07 100644 --- a/src/can/can-signals.cpp +++ b/src/can/can-signals.cpp @@ -30,16 +30,21 @@ can_message_definition_t& can_signal_t::get_message() return message_; } -std::string& can_signal_t::get_generic_name() +const std::string& can_signal_t::get_generic_name() const { return generic_name_; } -std::string can_signal_t::get_name() +const std::string can_signal_t::get_name() const { return prefix_ + "." + generic_name_; } +const std::string& can_signal_t::get_prefix() const +{ + return prefix_; +} + uint8_t can_signal_t::get_bit_position() const { return bit_position_; -- cgit 1.2.3-korg