KiCad PCB EDA Suite
displlst.cpp File Reference
#include <fctsys.h>
#include <macros.h>
#include <draw_frame.h>
#include <kicad_string.h>
#include <dialog_helpers.h>

Go to the source code of this file.


static int wxCALLBACK myCompareFunction (wxIntPtr aItem1, wxIntPtr aItem2, wxIntPtr WXUNUSED(aSortData))

Function Documentation

static int wxCALLBACK myCompareFunction ( wxIntPtr  aItem1,
wxIntPtr  aItem2,
wxIntPtr   WXUNUSEDaSortData 

Definition at line 239 of file displlst.cpp.

References StrNumCmp().

Referenced by EDA_LIST_DIALOG::sortList().

241 {
242  wxString* component1Name = (wxString*) aItem1;
243  wxString* component2Name = (wxString*) aItem2;
245  return StrNumCmp( *component1Name, *component2Name, INT_MAX, true );
246 }
int StrNumCmp(const wxString &aString1, const wxString &aString2, int aLength, bool aIgnoreCase)
Function StrLenNumCmp is a routine compatible with qsort() to sort by alphabetical order...
Definition: string.cpp:238