Skip to content

Commit

Permalink
Refactor[BMQT]: make Subscription rule-of-three complaint (#370)
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
  • Loading branch information
678098 authored Jul 23, 2024
1 parent 76081a7 commit 3831d54
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions src/groups/bmq/bmqt/bmqt_subscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -385,9 +378,9 @@ inline bsl::ostream& SubscriptionExpression::print(bsl::ostream& stream,
return stream;
}

// ----------------------
// ------------------
// class Subscription
// ----------------------
// ------------------

inline Subscription::Subscription()
: d_maxUnconfirmedMessages()
Expand All @@ -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
{
Expand Down

0 comments on commit 3831d54

Please sign in to comment.