MCPcopy Create free account
hub / github.com/cinder/Cinder / offset_from_ptr

Method offset_from_ptr

include/imgui/imgui_internal.h:798–798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796 int chunk_size(const T* p) { return ((const int*)p)[-1]; }
797 T* end() { return (T*)(void*)(Buf.Data + Buf.Size); }
798 int offset_from_ptr(const T* p) { IM_ASSERT(p >= begin() && p < end()); const ptrdiff_t off = (const char*)p - Buf.Data; return (int)off; }
799 T* ptr_from_offset(int off) { IM_ASSERT(off >= 4 && off < Buf.Size); return (T*)(void*)(Buf.Data + off); }
800 void swap(ImChunkStream<T>& rhs) { rhs.Buf.swap(Buf); }
801};

Callers 4

TableSaveSettingsMethod · 0.80
TableLoadSettingsMethod · 0.80
CreateNewWindowFunction · 0.80

Calls 2

beginFunction · 0.70
endFunction · 0.70

Tested by

no test coverage detected