ImVector: Added operator[] taking a size_t index.
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index 7232b97..40cd4e0 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -488,6 +488,7 @@
tree depth instead of a relative one.
- Log/Capture: Fixed CollapsingHeader trailing ascii representation being "#" instead of "##".
- ImFont: Added GetGlyphRangesVietnamese() helper. (#2403)
+- Misc: ImVector: Added operator[] taking a size_t index.
- Misc: Asserting in NewFrame() if style.WindowMinSize is zero or smaller than (1.0f,1.0f).
- Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
- Demo: InputText: Demonstrating use of ImGuiInputTextFlags_CallbackResize. (#2006, #1443, #1008).
diff --git a/imgui.h b/imgui.h
index 9fcdaea..6282023 100644
--- a/imgui.h
+++ b/imgui.h
@@ -1258,6 +1258,8 @@
inline int capacity() const { return Capacity; }
inline T& operator[](int i) { IM_ASSERT(i < Size); return Data[i]; }
inline const T& operator[](int i) const { IM_ASSERT(i < Size); return Data[i]; }
+ inline T& operator[](size_t i) { IM_ASSERT(i < (size_t)Size); return Data[i]; }
+ inline const T& operator[](size_t i) const { IM_ASSERT(i < (size_t)Size); return Data[i]; }
inline void clear() { if (Data) { Size = Capacity = 0; IM_FREE(Data); Data = NULL; } }
inline T* begin() { return Data; }