Skip to content

Commit

Permalink
Refs #21077: Revision - != operator
Browse files Browse the repository at this point in the history
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
  • Loading branch information
cferreiragonz committed Jun 19, 2024
1 parent 88ee299 commit 19d5c68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions include/fastdds/rtps/attributes/PropertyPolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ class PropertyPolicy
(this->binary_properties_ == b.binary_properties_);
}

FASTDDS_EXPORTED_API bool operator !=(
const PropertyPolicy& b) const
{
return !(*this == b);
}

//!Get properties
FASTDDS_EXPORTED_API const PropertySeq& properties() const
{
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/fastdds/domain/DomainParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ bool DomainParticipantImpl::set_qos(
{
to.allocation() = from.allocation();
}
if (first_time && !(to.properties() == from.properties()))
if (first_time && (to.properties() != from.properties()))
{
to.properties() = from.properties();
}
Expand Down Expand Up @@ -1710,7 +1710,7 @@ bool DomainParticipantImpl::can_qos_be_updated(
EPROSIMA_LOG_WARNING(RTPS_QOS_CHECK,
"ParticipantResourceLimitsQos cannot be changed after the participant is enabled");
}
if (!(to.properties() == from.properties()))
if ((to.properties() != from.properties()))
{
updatable = false;
EPROSIMA_LOG_WARNING(RTPS_QOS_CHECK, "PropertyPolicyQos cannot be changed after the participant is enabled");
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,7 @@ bool DataWriterImpl::can_qos_be_updated(
EPROSIMA_LOG_WARNING(RTPS_QOS_CHECK,
"Only the period of Positive ACKs can be changed after the creation of a DataWriter.");
}
if (!(to.properties() == from.properties()))
if (to.properties() != from.properties())
{
updatable = false;
EPROSIMA_LOG_WARNING(RTPS_QOS_CHECK, "PropertyPolicyQos cannot be changed after the DataWriter is enabled.");
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/fastdds/subscriber/DataReaderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ bool DataReaderImpl::can_qos_be_updated(
EPROSIMA_LOG_WARNING(RTPS_QOS_CHECK,
"data_sharing_listener_thread cannot be changed after the DataReader is enabled.");
}
if (!(to.properties() == from.properties()))
if (to.properties() != from.properties())
{
updatable = false;
EPROSIMA_LOG_WARNING(RTPS_QOS_CHECK, "PropertyPolicyQos cannot be changed after the DataReader is enabled.");
Expand Down Expand Up @@ -1749,7 +1749,7 @@ void DataReaderImpl::set_qos(
to.expects_inline_qos(from.expects_inline_qos());
}

if (first_time && !(to.properties() == from.properties()))
if (first_time && (to.properties() != from.properties()))
{
to.properties() = from.properties();
}
Expand Down

0 comments on commit 19d5c68

Please sign in to comment.