[core] Named members for diff before/after

This commit is contained in:
John Firebaugh
2017-06-01 08:26:24 -07:00
parent 9dfc2d924d
commit 5d5f9405b4
3 changed files with 12 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ StyleDifference<T> diff(const Immutable<std::vector<T>>& a,
bIt++;
} else {
if (aIt->get() != bIt->get()) {
result.changed.emplace((*bIt)->id, std::array<T, 2> {{ *aIt, *bIt }});
result.changed.emplace((*bIt)->id, StyleChange<T> { *aIt, *bIt });
}
aIt++;
bIt++;
@@ -73,7 +73,7 @@ bool hasLayoutDifference(const LayerDifference& layerDiff, const std::string& la
const auto it = layerDiff.changed.find(layerID);
if (it == layerDiff.changed.end())
return false;
return it->second[0]->hasLayoutDifference(*it->second[1]);
return it->second.before->hasLayoutDifference(*it->second.after);
}
} // namespace mbgl