mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Performance tweaks.
This commit is contained in:
parent
8235843d01
commit
3d5a87d8db
@ -33,7 +33,7 @@
|
||||
const int dblibSchemaVersion = 1;
|
||||
|
||||
|
||||
DATABASE_FIELD_MAPPING::DATABASE_FIELD_MAPPING( std::string aColumn, std::string aName,
|
||||
DATABASE_FIELD_MAPPING::DATABASE_FIELD_MAPPING( const std::string& aColumn, const std::string& aName,
|
||||
bool aVisibleOnAdd, bool aVisibleInChooser,
|
||||
bool aShowName, bool aInheritProperties ) :
|
||||
column( aColumn ),
|
||||
|
@ -980,7 +980,7 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
|
||||
for( TREE_NODE* pnode : params )
|
||||
stack.push_back( pnode );
|
||||
|
||||
node->leaf[1]->SetUop( TR_OP_METHOD_CALL, func, std::move( vref ) );
|
||||
node->leaf[1]->SetUop( TR_OP_METHOD_CALL, std::move( func ), std::move( vref ) );
|
||||
node->isTerminal = false;
|
||||
break;
|
||||
}
|
||||
|
@ -310,31 +310,31 @@ void PROPERTY_MANAGER::CLASS_DESC::rebuild()
|
||||
|
||||
auto collectGroups =
|
||||
[&]( std::set<wxString>& aSet, std::vector<wxString>& aResult )
|
||||
{
|
||||
auto collectGroupsRecursive =
|
||||
[]( auto& aSelf, std::set<wxString>& aSetR, std::vector<wxString>& aResultR,
|
||||
const CLASS_DESC& aClassR ) -> void
|
||||
{
|
||||
for( const wxString& group : aClassR.m_groupDisplayOrder )
|
||||
{
|
||||
if( !aSetR.count( group ) )
|
||||
{
|
||||
aSetR.insert( group );
|
||||
aResultR.emplace_back( group );
|
||||
}
|
||||
}
|
||||
auto collectGroupsRecursive =
|
||||
[]( auto& aSelf, std::set<wxString>& aSetR, std::vector<wxString>& aResultR,
|
||||
const CLASS_DESC& aClassR ) -> void
|
||||
{
|
||||
for( const wxString& group : aClassR.m_groupDisplayOrder )
|
||||
{
|
||||
if( !aSetR.count( group ) )
|
||||
{
|
||||
aSetR.insert( group );
|
||||
aResultR.emplace_back( group );
|
||||
}
|
||||
}
|
||||
|
||||
for( const CLASS_DESC& base : aClassR.m_bases )
|
||||
aSelf( aSelf, aSetR, aResultR, base );
|
||||
};
|
||||
for( const CLASS_DESC& base : aClassR.m_bases )
|
||||
aSelf( aSelf, aSetR, aResultR, base );
|
||||
};
|
||||
|
||||
collectGroupsRecursive( collectGroupsRecursive, aSet, aResult, *this );
|
||||
};
|
||||
collectGroupsRecursive( collectGroupsRecursive, aSet, aResult, *this );
|
||||
};
|
||||
|
||||
// TODO(JE): This currently relies on rebuild() happening after all properties are added
|
||||
// separate out own groups vs. all groups to fix
|
||||
collectGroups( groups, displayOrder );
|
||||
m_groupDisplayOrder = displayOrder;
|
||||
m_groupDisplayOrder = std::move( displayOrder );
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,8 +53,8 @@ struct KICOMMON_API DATABASE_FIELD_MAPPING
|
||||
bool show_name; ///< Whether or not to show the field name as well as its value
|
||||
bool inherit_properties; ///< Whether or not to inherit properties from symbol field
|
||||
|
||||
explicit DATABASE_FIELD_MAPPING( std::string aColumn, std::string aName, bool aVisibleOnAdd,
|
||||
bool aVisibleInChooser, bool aShowName,
|
||||
explicit DATABASE_FIELD_MAPPING( const std::string& aColumn, const std::string& aName,
|
||||
bool aVisibleOnAdd, bool aVisibleInChooser, bool aShowName,
|
||||
bool aInheritProperties );
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user