View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002065 | NoesisGUI | C++ SDK | public | 2021-07-27 11:52 | 2021-07-28 11:38 |
| Reporter | steveh | Assigned To | sfernandez | ||
| Priority | normal | Severity | minor | ||
| Status | assigned | Resolution | open | ||
| Product Version | 3.0.9 | ||||
| Summary | 0002065: CollectionSortBehaviour::RemSortedItem uses incorrect logic | ||||
| Description | Hi guys, Just wanted to let you know that CollectionSortBehaviour::RemSortedItem breaks if there are multiple elements with the same priority. The current implementation tries to find the index of the element to remove by binary searching. This works fine if everything has a unique priority, but if there are multiple elements with the same priority then this might attempt to remove any elements matching the input priority. For now we've just changed the implementation to a linear search: void CollectionSortBehaviour::RemSortedItem(SortComparer comparer, SortedCollection list, Noesis:::BaseComponent* item) Obviously this changes the O(log n) -> O(n), but that's fine for us as n is trivially small. | ||||
| Steps To Reproduce |
| ||||
| Platform | Any | ||||