Skip to content

Commit

Permalink
Add QosPolicy copy constructor (eProsima#1052)
Browse files Browse the repository at this point in the history
* Add QosPolicy copy constructor

* Requested Changes
  • Loading branch information
lauramg15 authored Mar 10, 2020
1 parent 83380dd commit 7de74e2
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions include/fastdds/dds/core/policy/QosPolicies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ class QosPolicy
{
}

QosPolicy(
explicit QosPolicy(
bool send_always)
: hasChanged(false)
, send_always_(send_always)
{
}

virtual ~QosPolicy()
{
}
QosPolicy(
const QosPolicy& b) = default;

virtual ~QosPolicy() = default;

bool operator ==(
const QosPolicy& b) const
Expand All @@ -71,6 +72,9 @@ class QosPolicy
(this->send_always_ == b.send_always_);
}

QosPolicy& operator =(
const QosPolicy& b) = default;

/**
* Whether it should always be sent.
* @return True if it should always be sent.
Expand Down Expand Up @@ -1131,8 +1135,8 @@ class PartitionQosPolicy : public Parameter_t, public QosPolicy
PartitionQosPolicy& operator =(
const PartitionQosPolicy& b)
{
QosPolicy::operator=(b);
Parameter_t::operator=(b);
QosPolicy::operator =(b);
Parameter_t::operator =(b);
max_size_ = b.max_size_;
partitions_.reserve(max_size_ != 0 ?
b.partitions_.max_size :
Expand Down

0 comments on commit 7de74e2

Please sign in to comment.