Browse Source

Updated ImGui.

Branimir Karadžić 8 years ago
parent
commit
040742ba4c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      3rdparty/ocornut-imgui/imgui.h
  2. 1 1
      3rdparty/ocornut-imgui/imgui_draw.cpp

+ 1 - 1
3rdparty/ocornut-imgui/imgui.h

@@ -39,7 +39,7 @@
 #define IM_FMTLIST(FMT)
 #endif
 #define IM_ARRAYSIZE(_ARR)          ((int)(sizeof(_ARR)/sizeof(*_ARR)))
-#define IM_OFFSETOF(_TYPE,_ELM)     ((size_t)&(((_TYPE*)0)->_ELM))
+#define IM_OFFSETOF(_TYPE,_MEMBER)  ((size_t)&(((_TYPE*)0)->_MEMBER))       // Offset of _MEMBER within _TYPE. Standardized as offsetof() in modern C++.
 
 #if defined(__clang__)
 #pragma clang diagnostic push

+ 1 - 1
3rdparty/ocornut-imgui/imgui_draw.cpp

@@ -1441,7 +1441,7 @@ void    ImFontAtlas::GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_wid
     // Although it is likely to be the most commonly used format, our font rendering is 1 channel / 8 bpp
     if (!TexPixelsRGBA32)
     {
-        unsigned char* pixels;
+        unsigned char* pixels = NULL;
         GetTexDataAsAlpha8(&pixels, NULL, NULL);
         if (pixels)
         {