From 53ae3f24c9458d324572ac8c23f5b8c90c4ac24e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Dec 2021 20:11:09 +0000 Subject: Refactor wrapped_ptr to include destory function as template param, and possibly constructor function --- gfx/window.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gfx/window.h') diff --git a/gfx/window.h b/gfx/window.h index 3ac583f..252ccaa 100644 --- a/gfx/window.h +++ b/gfx/window.h @@ -19,8 +19,11 @@ public: void SwapBuffers() const; private: - wrapped_ptr m_window; - wrapped_ptr> m_glContext; + using GL_Context = std::remove_pointer_t; + using SDL_WindowPtr = wrapped_ptrt; + using SDL_GLContextPtr = wrapped_ptrt; + SDL_WindowPtr m_window; + SDL_GLContextPtr m_glContext; }; #endif -- cgit v1.2.3