Skip to content

Commit

Permalink
Refs 12758. Optimization on DataReaderHistory::remove_change_nts.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Dec 13, 2021
1 parent aa8b8e6 commit 7c473e3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cpp/fastdds/subscriber/history/DataReaderHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,7 @@ ReaderHistory::iterator DataReaderHistory::remove_change_nts(
assert(it != keyed_changes_.end());

auto& c = it->second.cache_changes;
c.erase(std::remove_if(c.begin(), c.end(), [p_sample](DataReaderCacheChange& elem)
{
return elem == p_sample;
}), c.end());
c.erase(std::remove(c.begin(), c.end(), p_sample), c.end());
}

// call the base class
Expand Down

0 comments on commit 7c473e3

Please sign in to comment.