mirror of
https://git.freebsd.org/ports.git
synced 2025-07-16 16:59:17 -04:00
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
This commit is contained in:
parent
aec9c6c9cf
commit
7cb3d96ec5
1 changed files with 19 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue