From 8c6c950ed013da570da2120f03c484cb62fb6014 Mon Sep 17 00:00:00 2001 From: Anar Manafov Date: Tue, 29 Mar 2022 20:48:30 +0200 Subject: [PATCH] Fixed: deprecated std::interator (C++17). --- CMakeLists.txt | 2 +- ReleaseNotes.md | 1 + dds-commander/src/ConnectionManager.cpp | 1 + dds-misc-lib/src/CustomIterator.h | 7 ++++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62f1def6..11814a46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -420,7 +420,7 @@ set( WN_PKG_DIR "${CMAKE_BINARY_DIR}/dds-wrk-bin" ) set( WN_PKG_NAME_ARCH "${WN_PKG_NAME}.tar.gz" ) set( WN_PKG_REMOTE_DIR "/u/ddswww/web-docs/releases/add/${DDS_VERSION}" ) -set(DDS_BOOST_LIB_DIR ${Boost_LIBRARY_DIR}) +set(DDS_BOOST_LIB_DIR ${Boost_LIBRARY_DIRS}) if("${DDS_BOOST_LIB_DIR}" STREQUAL "") set(DDS_BOOST_LIB_DIR ${Boost_LIBRARY_DIR_RELEASE}) endif() diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 88094d8f..92a0e82c 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -5,6 +5,7 @@ ### DDS common Added: every DDS module logs now its pid, group id and parent pid. (GH-403) Fixed: On task done remove agents from the agent to tasks mapping. +Fixed: Replace std::iterator as it's deprecated (C++17). ### dds-session Fixed: skip bad or non-session directories/files when performing clean and list operations. diff --git a/dds-commander/src/ConnectionManager.cpp b/dds-commander/src/ConnectionManager.cpp index 5014d5c7..6e08b4e6 100644 --- a/dds-commander/src/ConnectionManager.cpp +++ b/dds-commander/src/ConnectionManager.cpp @@ -1221,6 +1221,7 @@ void CConnectionManager::updateTopology(const dds::tools_api::STopologyRequestDa weakChannelInfo_t::container_t agents; for (auto taskID : removedTasks) { + lock_guard lock(m_mapMutex); auto agentChannel = m_taskIDToAgentChannelMap[taskID]; agents.push_back(agentChannel); } diff --git a/dds-misc-lib/src/CustomIterator.h b/dds-misc-lib/src/CustomIterator.h index 2cebbc58..82e950d3 100644 --- a/dds-misc-lib/src/CustomIterator.h +++ b/dds-misc-lib/src/CustomIterator.h @@ -21,9 +21,14 @@ namespace dds::misc * */ template , class Dist = std::ptrdiff_t> - class custom_istream_iterator : public std::iterator + class custom_istream_iterator { public: + using iterator_category = std::input_iterator_tag; + using value_type = T; + using difference_type = Dist; + using pointer = T*; + using reference = T&; typedef custom_istream_iterator m_it; typedef Ch char_type; typedef Tr traits_type;