Skip to content

Commit

Permalink
Fixed compile error against Qt 5.12
Browse files Browse the repository at this point in the history
It did not have QKeyValueIterator::operator-> yet.
  • Loading branch information
bjorn committed Feb 26, 2024
1 parent 3bd358a commit 7cc186e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tiled/automapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1249,13 +1249,12 @@ void AutoMapper::applyRule(const Rule &rule, QPoint pos,
outputLayerRegion |= objectTileRect(*mRulesMapRenderer, *mapObject);
}

// Translate the regions to the position of the rule and check for
// overlap.
// Translate the regions to the position of the rule and check for overlap.
for (auto it = ruleRegionInLayer.keyValueBegin(), it_end = ruleRegionInLayer.keyValueEnd();
it != it_end; ++it) {

const Layer *layer = it->first;
QRegion &region = it->second;
const Layer *layer = it.base().key();
QRegion &region = it.base().value();

region.translate(pos.x(), pos.y());

Expand All @@ -1267,8 +1266,8 @@ void AutoMapper::applyRule(const Rule &rule, QPoint pos,
for (auto it = ruleRegionInLayer.keyValueBegin(), it_end = ruleRegionInLayer.keyValueEnd();
it != it_end; ++it) {

const Layer *layer = it->first;
const QRegion &region = it->second;
const Layer *layer = it.base().key();
const QRegion &region = it.base().value();

applyContext.appliedRegions[layer] |= region;
}
Expand Down

0 comments on commit 7cc186e

Please sign in to comment.