From b4df6c86476e98e2800aef548cf7931930cf740a Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Tue, 18 Feb 2020 14:22:57 -0800 Subject: [PATCH] add default assignment operator for various classes --- clients/roscpp/include/ros/publisher.h | 1 + clients/roscpp/include/ros/service_client.h | 1 + clients/roscpp/include/ros/service_server.h | 1 + clients/roscpp/include/ros/steady_timer.h | 1 + clients/roscpp/include/ros/subscriber.h | 1 + clients/roscpp/include/ros/timer.h | 1 + clients/roscpp/include/ros/wall_timer.h | 1 + 7 files changed, 7 insertions(+) diff --git a/clients/roscpp/include/ros/publisher.h b/clients/roscpp/include/ros/publisher.h index 053363956f..53987f52f7 100644 --- a/clients/roscpp/include/ros/publisher.h +++ b/clients/roscpp/include/ros/publisher.h @@ -50,6 +50,7 @@ namespace ros Publisher() {} Publisher(const Publisher& rhs); ~Publisher(); + Publisher& operator=(const Publisher& other) = default; /** * \brief Publish a message on the topic associated with this Publisher. diff --git a/clients/roscpp/include/ros/service_client.h b/clients/roscpp/include/ros/service_client.h index efe2acbe96..3a51f15172 100644 --- a/clients/roscpp/include/ros/service_client.h +++ b/clients/roscpp/include/ros/service_client.h @@ -46,6 +46,7 @@ class ROSCPP_DECL ServiceClient ServiceClient(const std::string& service_name, bool persistent, const M_string& header_values, const std::string& service_md5sum); ServiceClient(const ServiceClient& rhs); ~ServiceClient(); + ServiceClient& operator=(const ServiceClient& other) = default; /** * @brief Call the service aliased by this handle with the specified request/response messages. diff --git a/clients/roscpp/include/ros/service_server.h b/clients/roscpp/include/ros/service_server.h index fbe40bf2e1..e7d253e693 100644 --- a/clients/roscpp/include/ros/service_server.h +++ b/clients/roscpp/include/ros/service_server.h @@ -48,6 +48,7 @@ class ROSCPP_DECL ServiceServer ServiceServer() {} ServiceServer(const ServiceServer& rhs); ~ServiceServer(); + ServiceServer& operator=(const ServiceServer& other) = default; /** * \brief Unadvertise the service associated with this ServiceServer diff --git a/clients/roscpp/include/ros/steady_timer.h b/clients/roscpp/include/ros/steady_timer.h index 0000263faf..c88388df5e 100644 --- a/clients/roscpp/include/ros/steady_timer.h +++ b/clients/roscpp/include/ros/steady_timer.h @@ -49,6 +49,7 @@ class ROSCPP_DECL SteadyTimer SteadyTimer() {} SteadyTimer(const SteadyTimer& rhs); ~SteadyTimer(); + SteadyTimer& operator=(const SteadyTimer& other) = default; /** * \brief Start the timer. Does nothing if the timer is already started. diff --git a/clients/roscpp/include/ros/subscriber.h b/clients/roscpp/include/ros/subscriber.h index 9f931981eb..da05d143d9 100644 --- a/clients/roscpp/include/ros/subscriber.h +++ b/clients/roscpp/include/ros/subscriber.h @@ -49,6 +49,7 @@ class ROSCPP_DECL Subscriber Subscriber() {} Subscriber(const Subscriber& rhs); ~Subscriber(); + Subscriber& operator=(const Subscriber& other) = default; /** * \brief Unsubscribe the callback associated with this Subscriber diff --git a/clients/roscpp/include/ros/timer.h b/clients/roscpp/include/ros/timer.h index 339313cf60..a62cfa434e 100644 --- a/clients/roscpp/include/ros/timer.h +++ b/clients/roscpp/include/ros/timer.h @@ -49,6 +49,7 @@ class ROSCPP_DECL Timer Timer() {} Timer(const Timer& rhs); ~Timer(); + Timer& operator=(const Timer& other) = default; /** * \brief Start the timer. Does nothing if the timer is already started. diff --git a/clients/roscpp/include/ros/wall_timer.h b/clients/roscpp/include/ros/wall_timer.h index 652e79ae97..04379c6df2 100644 --- a/clients/roscpp/include/ros/wall_timer.h +++ b/clients/roscpp/include/ros/wall_timer.h @@ -49,6 +49,7 @@ class ROSCPP_DECL WallTimer WallTimer() {} WallTimer(const WallTimer& rhs); ~WallTimer(); + WallTimer& operator=(const WallTimer& other) = default; /** * \brief Start the timer. Does nothing if the timer is already started.