From 143628442c9c9f437b596489d1183db722b975d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 21 Apr 2015 11:48:58 -0700 Subject: [PATCH] Removed use of memset from header file. --- include/bgfxplatform.h | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/include/bgfxplatform.h b/include/bgfxplatform.h index 1dbaf7b1..68b8afe9 100644 --- a/include/bgfxplatform.h +++ b/include/bgfxplatform.h @@ -52,8 +52,10 @@ namespace bgfx inline void androidSetWindow(::ANativeWindow* _window) { PlatformData pd; - memset(&pd, 0, sizeof(pd) ); - pd.nwh = _window; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backbuffer = NULL; setPlatformData(pd); } @@ -66,8 +68,10 @@ namespace bgfx inline void iosSetEaglLayer(void* _window) { PlatformData pd; - memset(&pd, 0, sizeof(pd) ); - pd.nwh = _window; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backbuffer = NULL; setPlatformData(pd); } @@ -81,10 +85,10 @@ namespace bgfx inline void x11SetDisplayWindow(void* _display, uint32_t _window, void* _glx = NULL) { PlatformData pd; - memset(&pd, 0, sizeof(pd) ); - pd.ndt = _display; - pd.nwh = (void*)(uintptr_t)_window; - pd.context = _glx; + pd.ndt = _display; + pd.nwh = (void*)(uintptr_t)_window; + pd.context = _glx; + pd.backbuffer = NULL; setPlatformData(pd); } @@ -110,9 +114,10 @@ namespace bgfx inline void osxSetNSWindow(void* _window, void* _nsgl = NULL) { PlatformData pd; - memset(&pd, 0, sizeof(pd) ); - pd.nwh = _window; - pd.context = _nsgl; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = _nsgl; + pd.backbuffer = NULL; setPlatformData(pd); } @@ -127,8 +132,10 @@ namespace bgfx inline void winSetHwnd(::HWND _window) { PlatformData pd; - memset(&pd, 0, sizeof(pd) ); - pd.nwh = _window; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backbuffer = NULL; setPlatformData(pd); } @@ -143,8 +150,10 @@ namespace bgfx inline void winrtSetWindow(::IUnknown* _window) { PlatformData pd; - memset(&pd, 0, sizeof(pd) ); - pd.nwh = _window; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backbuffer = NULL; setPlatformData(pd); }