mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Fixed compatibility with std::vector if user decide to #define ImVector
This commit is contained in:
4
imgui.h
4
imgui.h
@ -573,8 +573,8 @@ struct ImGuiTextBuffer
|
||||
|
||||
ImGuiTextBuffer() { Buf.push_back(0); }
|
||||
~ImGuiTextBuffer() { clear(); }
|
||||
const char* begin() const { return Buf.begin(); }
|
||||
const char* end() const { return Buf.end()-1; }
|
||||
const char* begin() const { return &Buf.front(); }
|
||||
const char* end() const { return &Buf.back(); } // Buf is zero-terminated, so end() will point on the zero-terminator
|
||||
size_t size() const { return Buf.size()-1; }
|
||||
bool empty() { return Buf.empty(); }
|
||||
void clear() { Buf.clear(); Buf.push_back(0); }
|
||||
|
Reference in New Issue
Block a user