From 1da64571d99109a49b3f1152634618c92a0a7338 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Fri, 30 Aug 2013 22:31:40 -0700 Subject: [PATCH] Fixed MinGW build. --- examples/common/entry/entry_windows.cpp | 2 +- src/bgfx_p.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index dc8852f2..de3a05f3 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -68,9 +68,9 @@ namespace entry { Context() : m_frame(true) + , m_mouseLock(false) , m_init(false) , m_exit(false) - , m_mouseLock(false) { memset(s_translateKey, 0, sizeof(s_translateKey) ); s_translateKey[VK_ESCAPE] = Key::Esc; diff --git a/src/bgfx_p.h b/src/bgfx_p.h index 26210ae8..3f95b7c1 100755 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -78,8 +78,9 @@ namespace bgfx #define BGFX_CHUNK_MAGIC_TEX BX_MAKEFOURCC('T', 'E', 'X', 0x0) #define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x1) -#if BGFX_CONFIG_USE_TINYSTL +#include // mingw wants it to be before tr1/unordered_*... +#if BGFX_CONFIG_USE_TINYSTL namespace tinystl { struct bgfx_allocator @@ -98,13 +99,12 @@ namespace stl = tinystl; # include # include # include -namespace std { namespace tr1 {} } -namespace stl { +namespace stl +{ using namespace std; using namespace std::tr1; } #endif // BGFX_CONFIG_USE_TINYSTL -#include #if BX_PLATFORM_ANDROID # include