diff --git a/src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp b/src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp index 6a0727125f0..ed39212c126 100644 --- a/src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp +++ b/src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp @@ -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; diff --git a/src/cpp/rtps/history/ReaderHistory.cpp b/src/cpp/rtps/history/ReaderHistory.cpp index fd628531f87..50552de2602 100644 --- a/src/cpp/rtps/history/ReaderHistory.cpp +++ b/src/cpp/rtps/history/ReaderHistory.cpp @@ -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; diff --git a/src/cpp/utils/collections/sorted_vector_insert.hpp b/src/cpp/utils/collections/sorted_vector_insert.hpp index 35d2047ac46..6d45cf216c1 100644 --- a/src/cpp/utils/collections/sorted_vector_insert.hpp +++ b/src/cpp/utils/collections/sorted_vector_insert.hpp @@ -23,6 +23,8 @@ #include namespace eprosima { +namespace utilities { +namespace collections { /** * @brief Insert item into sorted vector-like collection @@ -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_