summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorjak1 <jak1@themanaworld.org>2023-04-07 03:07:40 +0200
committerjak1 <jak1@themanaworld.org>2023-04-07 03:07:40 +0200
commit3a722d278d2c864e2705833766edf9c6a261dca0 (patch)
tree13bf0efd2d77ba4a922dad996693959ce1fe6c66 /src/utils
parent8eb07f82959ea0b97df848386dda0538c63995e7 (diff)
downloadplus-3a722d278d2c864e2705833766edf9c6a261dca0.tar.gz
plus-3a722d278d2c864e2705833766edf9c6a261dca0.tar.bz2
plus-3a722d278d2c864e2705833766edf9c6a261dca0.tar.xz
plus-3a722d278d2c864e2705833766edf9c6a261dca0.zip
fixed gcc deprecation (unary & not1)
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/dtor.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/utils/dtor.h b/src/utils/dtor.h
index 368aa5ed9..2fb8d1908 100644
--- a/src/utils/dtor.h
+++ b/src/utils/dtor.h
@@ -29,19 +29,18 @@
#include "localconsts.h"
template<typename T>
-struct dtor final : public std::unary_function <T, void>
+struct dtor final
{
A_DEFAULT_COPY(dtor)
- void operator()(T &ptr)
+ constexpr 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)
+ constexpr void operator()(std::pair<T1, T2> &pair)
{ delete pair.second; }
};