diff --git a/common/utils/StringUtils.cpp b/common/utils/StringUtils.cpp index d01ac72e1..749ad7967 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 3e4e810d4..284eb9ae3 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 163e0ad77..623718a2c 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(); }