From 88ee29919aa1db49d9e8935a8f226781fbc1b385 Mon Sep 17 00:00:00 2001 From: cferreiragonz Date: Mon, 17 Jun 2024 15:57:18 +0200 Subject: [PATCH] Refs #21077: Revision - Clear method Signed-off-by: cferreiragonz --- include/fastdds/dds/publisher/qos/DataWriterQos.hpp | 3 +-- include/fastdds/dds/subscriber/qos/DataReaderQos.hpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/fastdds/dds/publisher/qos/DataWriterQos.hpp b/include/fastdds/dds/publisher/qos/DataWriterQos.hpp index 634afb025c5..0c0cd2a275f 100644 --- a/include/fastdds/dds/publisher/qos/DataWriterQos.hpp +++ b/include/fastdds/dds/publisher/qos/DataWriterQos.hpp @@ -60,8 +60,7 @@ class RTPSReliableWriterQos inline void clear() { - RTPSReliableWriterQos reset = RTPSReliableWriterQos(); - std::swap(*this, reset); + *this = RTPSReliableWriterQos(); } //!Writer Timing Attributes diff --git a/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp b/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp index 64b85b227e0..17339fd2c2d 100644 --- a/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp +++ b/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp @@ -60,8 +60,7 @@ class RTPSReliableReaderQos inline void clear() { - RTPSReliableReaderQos reset = RTPSReliableReaderQos(); - std::swap(*this, reset); + *this = RTPSReliableReaderQos(); } /*!