MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ImLowerBound

Function ImLowerBound

3rdparty/imgui/src/imgui.cpp:2907–2925  ·  view source on GitHub ↗

std::lower_bound but without the bullshit

Source from the content-addressed store, hash-verified

2905
2906// std::lower_bound but without the bullshit
2907ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_end, ImGuiID key)
2908{
2909 ImGuiStoragePair* in_p = in_begin;
2910 for (size_t count = (size_t)(in_end - in_p); count > 0; )
2911 {
2912 size_t count2 = count >> 1;
2913 ImGuiStoragePair* mid = in_p + count2;
2914 if (mid->key < key)
2915 {
2916 in_p = ++mid;
2917 count -= count2 + 1;
2918 }
2919 else
2920 {
2921 count = count2;
2922 }
2923 }
2924 return in_p;
2925}
2926
2927IM_MSVC_RUNTIME_CHECKS_OFF
2928static 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