From 7cb3d96ec56ddb45d5d1099b710098b84e28c7bf Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Mon, 3 Jul 2023 12:14:26 +0000 Subject: [PATCH] games/xray_re-tools: unbreak the port's build against Clang 16 Both `std::const_mem_fun1_t' and `std::binary_function' template classes had been deprecated in C++11 and removed in C++17, let's get rid of them: the latter is just some typedefs and the former holds a pointer to a member function and provides `operator()'. Reported by: pkg-fallout --- .../files/patch-sources_xray__re_xr__writer.h | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h b/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h index 1fd78c9e0256..687f268be452 100644 --- a/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h +++ b/games/xray_re-tools/files/patch-sources_xray__re_xr__writer.h @@ -1,6 +1,24 @@ --- sources/xray_re/xr_writer.h.orig 2018-09-02 12:42:44 UTC +++ sources/xray_re/xr_writer.h -@@ -268,9 +268,9 @@ template inline void xr_ini_wr +@@ -68,12 +68,13 @@ class xr_writer { (public) + + void w_packet(const xr_packet& packet); + +- template struct f_w: public std::binary_function {}; +- struct f_w_sz: public f_w { ++ struct f_w_sz { + void operator()(const std::string& s, xr_writer& w) { w.w_sz(s); } + }; +- template struct f_w_const: public std::const_mem_fun1_t { +- explicit f_w_const(void (T::*_pmf)(xr_writer& w) const): std::const_mem_fun1_t(_pmf) {} ++ template struct f_w_const { ++ void (T::*_m_f)(xr_writer&) const; ++ explicit f_w_const(void (T::*_pmf)(xr_writer& w) const): _m_f(_pmf) {} ++ void operator()(const T* t, xr_writer& w) const { (t->*_m_f)(w); } + }; + + private: +@@ -268,9 +269,9 @@ template inline void xr_ini_wr template inline void xr_ini_writer::w_ini_seq(const T& container, F write, const char* prefix) { char buf[1024];