From 3831d54481d5f4737521072d0b35d03619feba42 Mon Sep 17 00:00:00 2001 From: Evgeny Malygin Date: Tue, 23 Jul 2024 19:01:01 +0300 Subject: [PATCH] Refactor[BMQT]: make Subscription rule-of-three complaint (#370) Signed-off-by: Evgeny Malygin --- src/groups/bmq/bmqt/bmqt_subscription.h | 26 +++++-------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/groups/bmq/bmqt/bmqt_subscription.h b/src/groups/bmq/bmqt/bmqt_subscription.h index d1d4fa902..80fef4db2 100644 --- a/src/groups/bmq/bmqt/bmqt_subscription.h +++ b/src/groups/bmq/bmqt/bmqt_subscription.h @@ -197,16 +197,9 @@ class Subscription { public: // CREATORS + /// Create a new Subscription Subscription(); - // Create a new Subscription - - /// Create a new Subscription by copying values from the specified - /// `other`. - Subscription(const Subscription& other); - - // MANIPULATORS - /// Set the maxUnconfirmedMessages to the specified `value`. The /// behavior is undefined unless `value >= 0`. If the specified `value` /// is set to 0, it means that the consumer does not receive any @@ -276,9 +269,9 @@ bsl::ostream& operator<<(bsl::ostream& stream, const Subscription& rhs); // INLINE DEFINITIONS // ============================================================================ -// ---------------------- +// ------------------------- // class Subscription_Handle -// ---------------------- +// ------------------------- inline SubscriptionHandle::SubscriptionHandle() : d_id(k_INVALID_HANDLE_ID) @@ -385,9 +378,9 @@ inline bsl::ostream& SubscriptionExpression::print(bsl::ostream& stream, return stream; } -// ---------------------- +// ------------------ // class Subscription -// ---------------------- +// ------------------ inline Subscription::Subscription() : d_maxUnconfirmedMessages() @@ -398,15 +391,6 @@ inline Subscription::Subscription() // NOTHING } -inline Subscription::Subscription(const Subscription& other) -: d_maxUnconfirmedMessages(other.d_maxUnconfirmedMessages) -, d_maxUnconfirmedBytes(other.d_maxUnconfirmedBytes) -, d_consumerPriority(other.d_consumerPriority) -, d_expression(other.d_expression) -{ - // NOTHING -} - inline bsl::ostream& Subscription::print(bsl::ostream& stream, int level, int spacesPerLevel) const {