diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-24 11:00:22 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-24 11:05:51 +0100 |
commit | 418ffcadb0a5334ebe621369c14d6c3dd651acce (patch) | |
tree | e76132cb4a9013676b9a6dc6222d5f3f68d3a099 /src/utils | |
parent | d9dc702115d705c39a39fb1f2290f5feb8dc19c9 (diff) | |
download | mana-418ffcadb0a5334ebe621369c14d6c3dd651acce.tar.gz mana-418ffcadb0a5334ebe621369c14d6c3dd651acce.tar.bz2 mana-418ffcadb0a5334ebe621369c14d6c3dd651acce.tar.xz mana-418ffcadb0a5334ebe621369c14d6c3dd651acce.zip |
Fixed compilation issues and use of deprecated C++ features
* Fixed compiler errors due to dynamic exception specifications
* Replace std::auto_ptr with std::unique_ptr
* Replace std::mem_fun with std::mem_fn
* Prefix for_each with std:: (apparently not needed before)
* Just use lambda instead of std::bind2nd
* Removed usages of std::unary_function
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/dtor.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/dtor.h b/src/utils/dtor.h index 223b73ed..76c68725 100644 --- a/src/utils/dtor.h +++ b/src/utils/dtor.h @@ -23,18 +23,16 @@ #define UTILS_DTOR_H #include <algorithm> -#include <functional> #include <utility> template<typename T> -struct dtor : public std::unary_function <T, void> +struct dtor { void operator()(T &ptr) { delete ptr; } }; template<typename T1, typename T2> -struct dtor<std::pair<T1, T2> > : -public std::unary_function <std::pair<T1, T2>, void> +struct dtor<std::pair<T1, T2>> { void operator()(std::pair<T1, T2> &pair) { delete pair.second; } }; |