Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
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
10 changes: 2 additions & 8 deletions cppapi/server/attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3515,10 +3515,7 @@ void Attribute::AttributeValue_5_2_AttributeValue_4(const Tango::AttributeValue_
// First pass the data from one union to another WITHOUT copying them
//

if (att_5->quality != Tango::ATTR_INVALID)
{
AttrValUnion_fake_copy(att_5,att_4);
}
AttrValUnion_fake_copy(att_5,att_4);

//
// The remaining fields
Expand Down Expand Up @@ -3561,10 +3558,7 @@ void Attribute::AttributeValue_4_2_AttributeValue_5(const Tango::AttributeValue_
// First pass the data from one union to another WITHOUT copying them
//

if (att_4->quality != Tango::ATTR_INVALID)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Less if-s - perfect!!!

{
AttrValUnion_fake_copy(att_4,att_5);
}
AttrValUnion_fake_copy(att_4,att_5);

//
// The remaining fields
Expand Down
1 change: 1 addition & 0 deletions cppapi/server/attribute.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,7 @@ void Attribute::AttrValUnion_fake_copy(const T *src, V *dst)
break;

case ATT_NO_DATA:
dst->value.union_no_data(true);
break;
}
}
Expand Down