You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: imgui.h
+64-66
Original file line number
Diff line number
Diff line change
@@ -73,73 +73,8 @@ struct ImVec4
73
73
#endif
74
74
};
75
75
76
-
namespaceImGui
77
-
{
78
-
// Proxy functions to access the MemAllocFn/MemFreeFn pointers in ImGui::GetIO(). The only reason they exist here is to allow ImVector<> to compile inline.
79
-
IMGUI_API void* MemAlloc(size_t sz);
80
-
IMGUI_API voidMemFree(void* ptr);
81
-
}
82
-
83
-
// Lightweight std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug).
84
-
// Use '#define ImVector std::vector' if you want to use the STL type or your own type.
85
-
// Our implementation does NOT call c++ constructors because we don't use them in ImGui. Don't use this class as a straight std::vector replacement in your code!
inline iterator erase(const_iterator it) { IM_ASSERT(it >= begin() && it < end()); constptrdiff_t off = it - begin(); memmove(Data + off, Data + off + 1, (Size - (size_t)off - 1) * sizeof(value_type)); Size--; return Data + off; }
138
-
inline iterator insert(const_iterator it, const value_type& v) { IM_ASSERT(it >= begin() && it <= end()); constptrdiff_t off = it - begin(); if (Size == Capacity) reserve(Capacity ? Capacity * 2 : 4); if (off < (int)Size) memmove(Data + off + 1, Data + off, (Size - (size_t)off) * sizeof(value_type)); Data[off] = v; Size++; return Data + off; }
139
-
};
140
-
#endif// #ifndef ImVector
141
-
142
76
// Helpers at bottom of the file:
77
+
// - class ImVector<> // Lightweight std::vector like class. Use '#define ImVector std::vector' if you want to use the STL type or your own type.
143
78
// - IMGUI_ONCE_UPON_A_FRAME // Execute a block of code once per frame only (convenient for creating UI within deep-nested code that runs multiple times)
144
79
// - struct ImGuiTextFilter // Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
145
80
// - struct ImGuiTextBuffer // Text buffer for logging/accumulating text
// Lightweight std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug).
670
+
// Use '#define ImVector std::vector' if you want to use the STL type or your own type.
671
+
// Our implementation does NOT call c++ constructors because we don't use them in ImGui. Don't use this class as a straight std::vector replacement in your code!
0 commit comments