git: 7cb3d96ec56d - main - games/xray_re-tools: unbreak the port's build against Clang 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 03 Jul 2023 12:15:19 UTC
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=7cb3d96ec56ddb45d5d1099b710098b84e28c7bf commit 7cb3d96ec56ddb45d5d1099b710098b84e28c7bf Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2023-07-03 12:14:26 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2023-07-03 12:14:26 +0000 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<typename T, typename F> inline void xr_ini_wr +@@ -68,12 +68,13 @@ class xr_writer { (public) + + void w_packet(const xr_packet& packet); + +- template<typename T> struct f_w: public std::binary_function<T, xr_writer, void> {}; +- struct f_w_sz: public f_w<std::string> { ++ struct f_w_sz { + void operator()(const std::string& s, xr_writer& w) { w.w_sz(s); } + }; +- template<typename T> struct f_w_const: public std::const_mem_fun1_t<void, T, xr_writer&> { +- explicit f_w_const(void (T::*_pmf)(xr_writer& w) const): std::const_mem_fun1_t<void, T, xr_writer&>(_pmf) {} ++ template<typename T> 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<typename T, typename F> inline void xr_ini_wr template<typename T, typename F> inline void xr_ini_writer::w_ini_seq(const T& container, F write, const char* prefix) { char buf[1024];