Skip to content

Commit

Permalink
Refs 12421. Moved new template method to correct namespace.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Sep 6, 2021
1 parent c8f29d5 commit a5ba5ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ bool SubscriberHistory::add_received_change_with_key(
}

//ADD TO KEY VECTOR
sorted_vector_insert(instance_changes, a_change,
eprosima::utilities::collections::sorted_vector_insert(instance_changes, a_change,
[](const CacheChange_t* lhs, const CacheChange_t* rhs)
{
return lhs->sourceTimestamp < rhs->sourceTimestamp;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/history/ReaderHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool ReaderHistory::add_change(
logError(RTPS_READER_HISTORY, "The Writer GUID_t must be defined");
}

sorted_vector_insert(m_changes, a_change,
eprosima::utilities::collections::sorted_vector_insert(m_changes, a_change,
[](const CacheChange_t* lhs, const CacheChange_t* rhs)
{
return lhs->sourceTimestamp < rhs->sourceTimestamp;
Expand Down
4 changes: 4 additions & 0 deletions src/cpp/utils/collections/sorted_vector_insert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <functional>

namespace eprosima {
namespace utilities {
namespace collections {

/**
* @brief Insert item into sorted vector-like collection
Expand Down Expand Up @@ -55,6 +57,8 @@ void sorted_vector_insert(
collection.insert(it, item);
}

} // namespace collections
} // namespace utilities
} // namespace eprosima

#endif // SRC_CPP_UTILS_COLLECTIONS_SORTED_VECTOR_INSERT_HPP_

0 comments on commit a5ba5ec

Please sign in to comment.