mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Merge branch 'master' into navigation
This commit is contained in:
10
imgui.h
10
imgui.h
@ -8,9 +8,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H)
|
||||
#include "imconfig.h" // User-editable configuration file
|
||||
// User-editable configuration files (edit stock imconfig.h or define IMGUI_USER_CONFIG to your own filename)
|
||||
#ifdef IMGUI_USER_CONFIG
|
||||
#include IMGUI_USER_CONFIG
|
||||
#endif
|
||||
#if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H)
|
||||
#include "imconfig.h"
|
||||
#endif
|
||||
|
||||
#include <float.h> // FLT_MAX
|
||||
#include <stdarg.h> // va_list
|
||||
#include <stddef.h> // ptrdiff_t, NULL
|
||||
@ -1130,6 +1135,7 @@ public:
|
||||
Capacity = new_capacity;
|
||||
}
|
||||
|
||||
// NB: &v cannot be pointing inside the ImVector Data itself! e.g. v.push_back(v[10]) is forbidden.
|
||||
inline void push_back(const value_type& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); Data[Size++] = v; }
|
||||
inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
|
||||
inline void push_front(const value_type& v) { if (Size == 0) push_back(v); else insert(Data, v); }
|
||||
|
Reference in New Issue
Block a user