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:
Laurent Montel
2017-04-24 11:59:30 +02:00
parent 47b4a0811f
commit cbe163584d
2 changed files with 2 additions and 2 deletions

View File

@@ -119,7 +119,7 @@ public:
return false;
}
// 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())) {
DCloneVisitor visitor;
otherElement->accept(&visitor);

View File

@@ -73,7 +73,7 @@ QList<Toolbar> StereotypeController::toolbars() const
QList<QString> StereotypeController::knownStereotypes(StereotypeIcon::Element stereotypeElement) const
{
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))
stereotypes += icon.stereotypes();
}