From ab37f77bd886e38cdd5f24afa4d840a77c23cff9 Mon Sep 17 00:00:00 2001 From: KuleRucket Date: Sat, 25 Mar 2023 23:59:43 +0100 Subject: [PATCH 1/2] Fix compiler warnings due to deprecated elements in C++17. --- src/process.cpp | 4 ++-- src/round_robin.h | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/process.cpp b/src/process.cpp index 3d3bd3e7988..9a6c9253873 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -71,9 +71,9 @@ boost::filesystem::path find_working_directory(const std::string &cmd, bp::envir BOOST_LOG(debug) << "Parsed executable ["sv << parts.at(0) << "] from command ["sv << cmd << ']'; - // If the cmd path is not a complete path, resolve it using our PATH variable + // If the cmd path is not an absolute path, resolve it using our PATH variable boost::filesystem::path cmd_path(parts.at(0)); - if(!cmd_path.is_complete()) { + if(!cmd_path.is_absolute()) { cmd_path = boost::process::search_path(parts.at(0)); if(cmd_path.empty()) { BOOST_LOG(error) << "Unable to find executable ["sv << parts.at(0) << "]. Is it in your PATH?"sv; diff --git a/src/round_robin.h b/src/round_robin.h index a7fe19a15f6..435656e16b8 100644 --- a/src/round_robin.h +++ b/src/round_robin.h @@ -5,14 +5,15 @@ namespace round_robin_util { template -class it_wrap_t : public std::iterator { +class it_wrap_t { public: - typedef T iterator; - typedef typename std::iterator::value_type class_t; - - typedef class_t &reference; - typedef class_t *pointer; + using iterator_category = std::random_access_iterator_tag; + using value_type = V; + using difference_type = V; + using pointer = V*; + using reference = V&; + typedef T iterator; typedef std::ptrdiff_t diff_t; iterator operator+=(diff_t step) { From e88a14411dd3bc51cb40d783793d4a4ee7489bd4 Mon Sep 17 00:00:00 2001 From: KuleRucket Date: Sun, 26 Mar 2023 01:52:36 +0100 Subject: [PATCH 2/2] lint fix --- src/round_robin.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/round_robin.h b/src/round_robin.h index 435656e16b8..09c32094daa 100644 --- a/src/round_robin.h +++ b/src/round_robin.h @@ -8,10 +8,10 @@ template class it_wrap_t { public: using iterator_category = std::random_access_iterator_tag; - using value_type = V; - using difference_type = V; - using pointer = V*; - using reference = V&; + using value_type = V; + using difference_type = V; + using pointer = V *; + using reference = V &; typedef T iterator; typedef std::ptrdiff_t diff_t;