From f8ae6df6eb78dbe61a7a063c7bf87319c33ba4dc Mon Sep 17 00:00:00 2001 From: Eran Date: Wed, 27 Dec 2023 08:19:59 +0200 Subject: [PATCH] fixup! change realdds::topics::device_info to be json-based change && to const &, per CR --- .../realdds/include/realdds/topics/device-info-msg.h | 8 ++++---- third-party/realdds/src/topics/device-info-msg.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/third-party/realdds/include/realdds/topics/device-info-msg.h b/third-party/realdds/include/realdds/topics/device-info-msg.h index 78ea8d3ec2..87c343e242 100644 --- a/third-party/realdds/include/realdds/topics/device-info-msg.h +++ b/third-party/realdds/include/realdds/topics/device-info-msg.h @@ -19,16 +19,16 @@ class device_info //bool locked = true; std::string const & name() const; - void set_name( std::string && ); + void set_name( std::string const & ); std::string const & topic_root() const; - void set_topic_root( std::string && ); + void set_topic_root( std::string const & ); std::string const & serial_number() const; - void set_serial_number( std::string && ); + void set_serial_number( std::string const & ); nlohmann::json const & to_json() const; - static device_info from_json( nlohmann::json const & j ); + static device_info from_json( nlohmann::json const & ); // Substring of information already stored in the device-info that can be used to print the device 'name'. // (mostly for use with debug messages) diff --git a/third-party/realdds/src/topics/device-info-msg.cpp b/third-party/realdds/src/topics/device-info-msg.cpp index ebf1947c06..93d033f43c 100644 --- a/third-party/realdds/src/topics/device-info-msg.cpp +++ b/third-party/realdds/src/topics/device-info-msg.cpp @@ -43,9 +43,9 @@ std::string const & device_info::name() const return rsutils::json::nested( _json, name_key ).string_ref_or_empty(); } -void device_info::set_name( std::string && v ) +void device_info::set_name( std::string const & v ) { - _json[name_key] = std::move( v ); + _json[name_key] = v; } @@ -54,9 +54,9 @@ std::string const & device_info::topic_root() const return rsutils::json::nested( _json, topic_root_key ).string_ref_or_empty(); } -void device_info::set_topic_root( std::string && v ) +void device_info::set_topic_root( std::string const & v ) { - _json[topic_root_key] = std::move( v ); + _json[topic_root_key] = v; } @@ -65,9 +65,9 @@ std::string const & device_info::serial_number() const return rsutils::json::nested( _json, serial_number_key ).string_ref_or_empty(); } -void device_info::set_serial_number( std::string && v ) +void device_info::set_serial_number( std::string const & v ) { - _json[serial_number_key] = std::move( v ); + _json[serial_number_key] = v; }