| 92 | struct StringsBuffer CC_BIG_VAR HotkeysText; |
| 93 | |
| 94 | static void Hotkeys_QuickSort(int left, int right) { |
| 95 | struct HotkeyData* keys = HotkeysList; struct HotkeyData key; |
| 96 | |
| 97 | while (left < right) { |
| 98 | int i = left, j = right; |
| 99 | cc_uint8 pivot = keys[(i + j) >> 1].mods; |
| 100 | |
| 101 | /* partition the list */ |
| 102 | while (i <= j) { |
| 103 | while (pivot < keys[i].mods) i++; |
| 104 | while (pivot > keys[j].mods) j--; |
| 105 | QuickSort_Swap_Maybe(); |
| 106 | } |
| 107 | /* recurse into the smaller subset */ |
| 108 | QuickSort_Recurse(Hotkeys_QuickSort) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | static void Hotkeys_AddNewHotkey(int trigger, cc_uint8 modifiers, const cc_string* text, cc_uint8 flags) { |
| 113 | struct HotkeyData hKey; |
no outgoing calls
no test coverage detected