MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / ImLowerBound

Function ImLowerBound

Dependencies/ImGui/src/imgui.cpp:2736–2754  ·  view source on GitHub ↗

std::lower_bound but without the bullshit

Source from the content-addressed store, hash-verified

2734
2735// std::lower_bound but without the bullshit
2736ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_end, ImGuiID key)
2737{
2738 ImGuiStoragePair* in_p = in_begin;
2739 for (size_t count = (size_t)(in_end - in_p); count > 0; )
2740 {
2741 size_t count2 = count >> 1;
2742 ImGuiStoragePair* mid = in_p + count2;
2743 if (mid->key < key)
2744 {
2745 in_p = ++mid;
2746 count -= count2 + 1;
2747 }
2748 else
2749 {
2750 count = count2;
2751 }
2752 }
2753 return in_p;
2754}
2755
2756IM_MSVC_RUNTIME_CHECKS_OFF
2757static int IMGUI_CDECL PairComparerByID(const void* lhs, const void* rhs)

Callers 10

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

Calls

no outgoing calls

Tested by

no test coverage detected