Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor[BMQT]: make Subscription rule-of-three complaint #370

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading