forked from qt-creator/qt-creator
Avoid some memory allocations
Change-Id: I6f3cba58307babd9e34be0c3f52e25b5f67b23e3 Reviewed-by: Jochen Becher <jochen_becher@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -119,7 +119,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// join other elements into this command
|
// join other elements into this command
|
||||||
foreach (const DElement *otherElement, otherUpdateCommand->m_clonedElements.values()) {
|
foreach (const DElement *otherElement, otherUpdateCommand->m_clonedElements) {
|
||||||
if (!m_clonedElements.contains(otherElement->uid())) {
|
if (!m_clonedElements.contains(otherElement->uid())) {
|
||||||
DCloneVisitor visitor;
|
DCloneVisitor visitor;
|
||||||
otherElement->accept(&visitor);
|
otherElement->accept(&visitor);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ QList<Toolbar> StereotypeController::toolbars() const
|
|||||||
QList<QString> StereotypeController::knownStereotypes(StereotypeIcon::Element stereotypeElement) const
|
QList<QString> StereotypeController::knownStereotypes(StereotypeIcon::Element stereotypeElement) const
|
||||||
{
|
{
|
||||||
QSet<QString> stereotypes;
|
QSet<QString> stereotypes;
|
||||||
foreach (const StereotypeIcon &icon, d->m_iconIdToStereotypeIconsMap.values()) {
|
foreach (const StereotypeIcon &icon, d->m_iconIdToStereotypeIconsMap) {
|
||||||
if (icon.elements().isEmpty() || icon.elements().contains(stereotypeElement))
|
if (icon.elements().isEmpty() || icon.elements().contains(stereotypeElement))
|
||||||
stereotypes += icon.stereotypes();
|
stereotypes += icon.stereotypes();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user