mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 20:07:01 +00:00
Exposed IM_ARRAYSIZE() in imgui.h
This commit is contained in:
parent
c5027d4fa1
commit
a6ff14d66e
2
imgui.h
2
imgui.h
@ -29,6 +29,7 @@
|
||||
#define IM_ASSERT(_EXPR) assert(_EXPR)
|
||||
#endif
|
||||
|
||||
// Helpers
|
||||
// Some compilers support applying printf-style warnings to user functions.
|
||||
#if defined(__clang__) || defined(__GNUC__)
|
||||
#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
|
||||
@ -37,6 +38,7 @@
|
||||
#define IM_FMTARGS(FMT)
|
||||
#define IM_FMTLIST(FMT)
|
||||
#endif
|
||||
#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
|
@ -79,7 +79,6 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit ImGui context pointe
|
||||
// Helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
|
||||
#define IM_PI 3.14159265358979323846f
|
||||
#define IM_OFFSETOF(_TYPE,_ELM) ((size_t)&(((_TYPE*)0)->_ELM))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user