From 3d6f7b412a2025dcc2181b152765f172475b4106 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 18 Apr 2026 17:06:59 +0100 Subject: [PATCH] Revert "Revert "Replace a few more deprecated pre-C++11 styles"" --- common/utils/StringUtils.cpp | 4 ++-- include/ola/ExportMap.h | 3 +-- include/olad/Plugin.h | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/common/utils/StringUtils.cpp b/common/utils/StringUtils.cpp index 749ad79676..d01ac72e12 100644 --- a/common/utils/StringUtils.cpp +++ b/common/utils/StringUtils.cpp @@ -454,12 +454,12 @@ bool HexStringToInt(const string &value, int64_t *output) { void ToLower(string *s) { std::transform(s->begin(), s->end(), s->begin(), - std::ptr_fun(std::tolower)); + [](int value){return std::tolower(value);}); } void ToUpper(string *s) { std::transform(s->begin(), s->end(), s->begin(), - std::ptr_fun(std::toupper)); + [](int value){return std::toupper(value);}); } void CapitalizeLabel(string *s) { diff --git a/include/ola/ExportMap.h b/include/ola/ExportMap.h index 284eb9ae3d..3e4e810d46 100644 --- a/include/ola/ExportMap.h +++ b/include/ola/ExportMap.h @@ -77,8 +77,7 @@ class BaseVariable { std::string m_name; }; -struct VariableLessThan: public std::binary_function { +struct VariableLessThan { bool operator()(BaseVariable *x, BaseVariable *y) { return x->Name() < y->Name(); } diff --git a/include/olad/Plugin.h b/include/olad/Plugin.h index 623718a2ca..163e0ad772 100644 --- a/include/olad/Plugin.h +++ b/include/olad/Plugin.h @@ -107,8 +107,7 @@ class AbstractPlugin { }; -struct PluginLessThan: public std::binary_function { +struct PluginLessThan { bool operator()(AbstractPlugin *x, AbstractPlugin *y) { return x->Id() < y->Id(); }