From f8d46a10c107881d51a863267f0ab34ab231e712 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Sun, 5 Jun 2022 13:05:14 -0700 Subject: [PATCH] Removes unhelpful inheritance --- plugins/prospector.cpp | 6 +++--- plugins/stockpiles/StockpileUtils.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/prospector.cpp b/plugins/prospector.cpp index 7bc8f2388..6b2079cf0 100644 --- a/plugins/prospector.cpp +++ b/plugins/prospector.cpp @@ -85,10 +85,10 @@ bool operator>(const matdata & q1, const matdata & q2) return q1.count > q2.count; } -template -struct shallower : public binary_function<_Tp, _Tp, bool> +template +struct shallower { - bool operator()(const _Tp& top, const _Tp& bottom) const + bool operator()(const Tp& top, const Tp& bottom) const { float topavg = (top.lower_z + top.upper_z)/2.0f; float btmavg = (bottom.lower_z + bottom.upper_z)/2.0f; diff --git a/plugins/stockpiles/StockpileUtils.h b/plugins/stockpiles/StockpileUtils.h index 8558485e4..f5570be92 100644 --- a/plugins/stockpiles/StockpileUtils.h +++ b/plugins/stockpiles/StockpileUtils.h @@ -52,7 +52,7 @@ static inline size_t find_plant ( const std::string &plant_id ) return linear_index ( df::global::world->raws.plants.all, &df::plant_raw::id, plant_id ); } -struct less_than_no_case: public std::binary_function< char,char,bool > +struct less_than_no_case { bool operator () (char x, char y) const {