std::lower_bound but without the bullshit
| 2775 | |
| 2776 | // std::lower_bound but without the bullshit |
| 2777 | ImGuiStoragePair* 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 | |
| 2797 | IM_MSVC_RUNTIME_CHECKS_OFF |
| 2798 | static int IMGUI_CDECL PairComparerByID(const void* lhs, const void* rhs) |
no outgoing calls
no test coverage detected