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

Function ImLowerBound

src/imgui/imgui.cpp:2777–2795  ·  view source on GitHub ↗

std::lower_bound but without the bullshit

Source from the content-addressed store, hash-verified

2775
2776// std::lower_bound but without the bullshit
2777ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_end, ImGuiID key)
2778{
2779 ImGuiStoragePair* in_p = in_begin;
2780 for (size_t count = (size_t)(in_end - in_p); count > 0; )
2781 {
2782 size_t count2 = count >> 1;
2783 ImGuiStoragePair* mid = in_p + count2;
2784 if (mid->key < key)
2785 {
2786 in_p = ++mid;
2787 count -= count2 + 1;
2788 }
2789 else
2790 {
2791 count = count2;
2792 }
2793 }
2794 return in_p;
2795}
2796
2797IM_MSVC_RUNTIME_CHECKS_OFF
2798static int IMGUI_CDECL PairComparerByID(const void* lhs, const void* rhs)

Callers 9

GetIntMethod · 0.70
GetFloatMethod · 0.70
GetVoidPtrMethod · 0.70
GetIntRefMethod · 0.70
GetFloatRefMethod · 0.70
GetVoidPtrRefMethod · 0.70
SetIntMethod · 0.70
SetFloatMethod · 0.70
SetVoidPtrMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected