diff --git a/OVP/D3D9Client/D3D9Util.h b/OVP/D3D9Client/D3D9Util.h index 156b941f3..a51627ecd 100644 --- a/OVP/D3D9Client/D3D9Util.h +++ b/OVP/D3D9Client/D3D9Util.h @@ -70,14 +70,13 @@ const char *_PTR(const void *p); #define SURFACE(x) ((class SurfNative *)x) // helper function to get address of a temporary +// The regular "easy" way no longer works on some compilers so lets use a hack to get a simple thing done. // NB: use with caution +template +T* ptr(T&& x) { return &x; } -// Required only with c++20 without /permissive flag -// template -// T* ptr(T&& x) { return &x; } -#define ptr & // use for faster code // ------------------------------------------------------------------------------------ // Vertex Declaration equal to NTVERTEX