Thread Previous • Date Previous • Date Next • Thread Next |
On 2019-06-30 02:05, Pradeepa Senanayake wrote:
Hello All, I started working on the bug #1752298 and I would like to get an understanding on the requirements. I feel that this is not a bug, rather it is a requirement to have a unified function for sorting. There can be many requirements for sorting in KiCAD. Therefore, before jumping into implementation, I'd like to ask what requirements we are after.
Hi Pradeepa-You might get faster responses in the bug report. It's sometimes helpful to keep the discussion archived there for future reference.
This report looks like a clean-up job. I think implementations exist for each requirement scattered through the codebase. The bug asks that these are centralized (and, I would add, it would be extremely useful for test cases to be added to our unit test framework under 'qa').
Generally, I would suggest that these live in the UTIL namespace. We have a cmp implementation there already in common/refdes_utils.cpp. It might not hit all requirements though so it would be good to check/verify. There are also some functions in common/string.{h,cpp}. Then there are the various ones scattered through the code.
We probably can't unify every one of them. But there's likely substantial overlap. Even the ones that can't be unified should live in the same file or namespace so that we can unit test them. A couple are listed in the bug report but the rest will be found by grepping.
Best- Seth
Thread Previous • Date Previous • Date Next • Thread Next |