mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
ImStrv: marked with IM_NODEBUGSTEP.
Reduce cognitive/debug-stepping load.
This commit is contained in:
parent
e4c9f665a5
commit
c2dd2c14f4
12
imgui.h
12
imgui.h
@ -341,12 +341,12 @@ struct ImStrv
|
|||||||
{
|
{
|
||||||
const char* Begin;
|
const char* Begin;
|
||||||
const char* End;
|
const char* End;
|
||||||
ImStrv() { Begin = End = NULL; }
|
IM_NODEBUGSTEP inline ImStrv() { Begin = End = NULL; }
|
||||||
ImStrv(const char* b) { Begin = b; End = b ? b + strlen(b) : NULL; }
|
IM_NODEBUGSTEP inline ImStrv(const char* b) { Begin = b; End = b ? b + strlen(b) : NULL; }
|
||||||
ImStrv(const char* b, const char* e){ Begin = b; End = e ? e : b ? b + strlen(b) : NULL; }
|
IM_NODEBUGSTEP inline ImStrv(const char* b, const char* e){ Begin = b; End = e ? e : b ? b + strlen(b) : NULL; }
|
||||||
inline int length() const { return (int)(End - Begin); }
|
IM_NODEBUGSTEP inline int length() const { return (int)(End - Begin); }
|
||||||
inline bool empty() const { return Begin == End; } // == "" or == NULL
|
IM_NODEBUGSTEP inline bool empty() const { return Begin == End; } // == "" or == NULL
|
||||||
inline operator bool() const { return Begin != NULL; } // return true when valid ("" is valid, NULL construction is not)
|
IM_NODEBUGSTEP inline operator bool() const { return Begin != NULL; } // return true when valid ("" is valid, NULL construction is not)
|
||||||
#ifdef IM_STRV_CLASS_EXTRA
|
#ifdef IM_STRV_CLASS_EXTRA
|
||||||
IM_STRV_CLASS_EXTRA // Define additional constructor in imconfig.h to convert your string types (e.g. std::string, std::string_view) to ImStrV.
|
IM_STRV_CLASS_EXTRA // Define additional constructor in imconfig.h to convert your string types (e.g. std::string, std::string_view) to ImStrV.
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user