Overview
Comment: | Fix menu sorting |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e1c921ff76644e0bda3e6d584cf50020 |
User & Date: | js on 2025-03-10 20:52:18 |
Other Links: | manifest | tags |
Context
2025-03-11
| ||
01:20 | Make use of the new -[OFString intValue] check-in: 09eb96f339 user: js tags: trunk | |
2025-03-10
| ||
20:52 | Fix menu sorting check-in: e1c921ff76 user: js tags: trunk | |
20:45 | Fix server segfaulting on start check-in: 9cb357d9b6 user: js tags: trunk | |
Changes
Modified src/MenuItem.m from [b6800d39f8] to [f7a80f995c].
︙ | ︙ | |||
14 15 16 17 18 19 20 | - (OFComparisonResult)compare:(id)otherObject { MenuItem *otherItem; if (![otherObject isKindOfClass:MenuItem.class]) @throw [OFInvalidArgumentException exception]; | > > | > > > > | > > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - (OFComparisonResult)compare:(id)otherObject { MenuItem *otherItem; if (![otherObject isKindOfClass:MenuItem.class]) @throw [OFInvalidArgumentException exception]; int x, y; @try { x = (int)_text.longLongValue; } @catch (OFInvalidFormatException *e) { x = 0; } @try { y = (int)otherItem.text.longLongValue; } @catch (OFInvalidFormatException *e) { y = 0; } if (x > y) return OFOrderedAscending; if (x < y) return OFOrderedDescending; return OFOrderedSame; |
︙ | ︙ |