Replace RefDesCmp with better StrNumCmp
This commit is contained in:
parent
d92d9898ad
commit
bc0302fafe
|
@ -35,7 +35,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include <refdes_utils.h>
|
#include <string_utils.h>
|
||||||
#include <erc_settings.h>
|
#include <erc_settings.h>
|
||||||
#include <sch_symbol.h>
|
#include <sch_symbol.h>
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
|
@ -130,7 +130,7 @@ bool SCH_REFERENCE_LIST::sortByRefAndValue( const SCH_REFERENCE& item1,
|
||||||
bool SCH_REFERENCE_LIST::sortByReferenceOnly( const SCH_REFERENCE& item1,
|
bool SCH_REFERENCE_LIST::sortByReferenceOnly( const SCH_REFERENCE& item1,
|
||||||
const SCH_REFERENCE& item2 )
|
const SCH_REFERENCE& item2 )
|
||||||
{
|
{
|
||||||
int ii = UTIL::RefDesStringCompare( item1.GetRef(), item2.GetRef() );
|
int ii = StrNumCmp( item1.GetRef(), item2.GetRef(), false );
|
||||||
|
|
||||||
if( ii == 0 )
|
if( ii == 0 )
|
||||||
ii = item1.m_unit - item2.m_unit;
|
ii = item1.m_unit - item2.m_unit;
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#ifndef CLASS_REGULATOR_DATA_H
|
#ifndef CLASS_REGULATOR_DATA_H
|
||||||
#define CLASS_REGULATOR_DATA_H
|
#define CLASS_REGULATOR_DATA_H
|
||||||
|
|
||||||
#include <refdes_utils.h>
|
#include <string_utils.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
|
|
||||||
for( ; ii < m_List.size(); ii++ )
|
for( ; ii < m_List.size(); ii++ )
|
||||||
{
|
{
|
||||||
if( UTIL::RefDesStringCompare( aItem->m_Name, m_List[ii]->m_Name ) < 0 )
|
if( StrNumCmp( aItem->m_Name, m_List[ii]->m_Name, true ) < 0 )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue