change to const auto&

This commit is contained in:
Miodrag Milanovic 2018-10-30 08:07:31 +01:00
parent 02edd66ae9
commit 0a3ebfbb5b

View File

@ -290,7 +290,7 @@ void DesignWidget::newContext(Context *ctx)
{ {
TreeModel::ElementXYRoot<BelId>::ElementMap belMap; TreeModel::ElementXYRoot<BelId>::ElementMap belMap;
for (auto bel : ctx->getBels()) { for (const auto& bel : ctx->getBels()) {
auto loc = ctx->getBelLocation(bel); auto loc = ctx->getBelLocation(bel);
belMap[std::pair<int, int>(loc.x, loc.y)].push_back(bel); belMap[std::pair<int, int>(loc.x, loc.y)].push_back(bel);
} }