Przeglądaj źródła

Tentative fix for GCC/Clang (#484, #504)

ocornut 9 lat temu
rodzic
commit
7afd62ec57
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      imgui_internal.h

+ 2 - 2
imgui_internal.h

@@ -141,8 +141,8 @@ static inline ImVec2 ImRound(ImVec2 v)
 // Defining a custom placement new() with a dummy parameter allows us to bypass including <new> which on some platforms complains when user has disabled exceptions.
 #ifdef IMGUI_DEFINE_PLACEMENT_NEW
 struct ImPlacementNewDummy {};
-static inline void* operator new(size_t, ImPlacementNewDummy, void* ptr) { return ptr; }
-static inline void operator delete(void*, ImPlacementNewDummy, void*) {}
+inline void* operator new(size_t, ImPlacementNewDummy, void* ptr) { return ptr; }
+inline void operator delete(void*, ImPlacementNewDummy, void*) {}
 #define IM_PLACEMENT_NEW(_PTR)  new(ImPlacementNewDummy() ,_PTR)
 #endif