Skip to content

Commit 6f46998

Browse files
authored
Revert "Replace deprecated pre-C++11 code (#1890)"
This reverts commit 597672a.
1 parent 6e8147a commit 6f46998

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

common/utils/StringUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,12 @@ bool HexStringToInt(const string &value, int64_t *output) {
454454

455455
void ToLower(string *s) {
456456
std::transform(s->begin(), s->end(), s->begin(),
457-
[](int value){return std::tolower(value);});
457+
std::ptr_fun<int, int>(std::tolower));
458458
}
459459

460460
void ToUpper(string *s) {
461461
std::transform(s->begin(), s->end(), s->begin(),
462-
[](int value){return std::toupper(value);});
462+
std::ptr_fun<int, int>(std::toupper));
463463
}
464464

465465
void CapitalizeLabel(string *s) {

include/ola/ExportMap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ class BaseVariable {
7777
std::string m_name;
7878
};
7979

80-
struct VariableLessThan {
80+
struct VariableLessThan: public std::binary_function<BaseVariable*,
81+
BaseVariable*, bool> {
8182
bool operator()(BaseVariable *x, BaseVariable *y) {
8283
return x->Name() < y->Name();
8384
}

include/olad/Plugin.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ class AbstractPlugin {
107107
};
108108

109109

110-
struct PluginLessThan {
110+
struct PluginLessThan: public std::binary_function<AbstractPlugin*,
111+
AbstractPlugin*, bool> {
111112
bool operator()(AbstractPlugin *x, AbstractPlugin *y) {
112113
return x->Id() < y->Id();
113114
}

0 commit comments

Comments
 (0)