From 6f46998b327daebd32a33d0cc34b93a8a1863024 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 18 Apr 2026 16:28:18 +0100 Subject: [PATCH] Revert "Replace deprecated pre-C++11 code (#1890)" This reverts commit 597672a03a8aec5d12ff71ddeffbd571f26d5ebb. --- common/utils/StringUtils.cpp | 4 ++-- include/ola/ExportMap.h | 3 ++- include/olad/Plugin.h | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/utils/StringUtils.cpp b/common/utils/StringUtils.cpp index d01ac72e12..749ad79676 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(), - [](int value){return std::tolower(value);}); + std::ptr_fun(std::tolower)); } void ToUpper(string *s) { std::transform(s->begin(), s->end(), s->begin(), - [](int value){return std::toupper(value);}); + std::ptr_fun(std::toupper)); } void CapitalizeLabel(string *s) { diff --git a/include/ola/ExportMap.h b/include/ola/ExportMap.h index 3e4e810d46..284eb9ae3d 100644 --- a/include/ola/ExportMap.h +++ b/include/ola/ExportMap.h @@ -77,7 +77,8 @@ class BaseVariable { std::string m_name; }; -struct VariableLessThan { +struct VariableLessThan: public std::binary_function { bool operator()(BaseVariable *x, BaseVariable *y) { return x->Name() < y->Name(); } diff --git a/include/olad/Plugin.h b/include/olad/Plugin.h index 163e0ad772..623718a2ca 100644 --- a/include/olad/Plugin.h +++ b/include/olad/Plugin.h @@ -107,7 +107,8 @@ class AbstractPlugin { }; -struct PluginLessThan { +struct PluginLessThan: public std::binary_function { bool operator()(AbstractPlugin *x, AbstractPlugin *y) { return x->Id() < y->Id(); }