[core] Fix use after std::move detected by clang-tidy
Detected by the bot being setup at https://github.com/mapbox/mapbox-gl-native/pull/15385.
This commit is contained in:
@@ -366,7 +366,7 @@ void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap, const GlyphPositions
|
||||
Shaping shaping = applyShaping(*feature.formattedText, WritingModeType::Horizontal, SymbolAnchorType::Center, justification);
|
||||
if (shaping) {
|
||||
shapingForJustification = std::move(shaping);
|
||||
if (shaping.lineCount == 1u) {
|
||||
if (shapingForJustification.lineCount == 1u) {
|
||||
shapedTextOrientations.singleLine = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -98,8 +98,9 @@ void GlyphManager::processResponse(const Response& res, const FontStack& fontSta
|
||||
}
|
||||
|
||||
for (auto& glyph : glyphs) {
|
||||
entry.glyphs.erase(glyph.id);
|
||||
entry.glyphs.emplace(glyph.id, makeMutable<Glyph>(std::move(glyph)));
|
||||
auto id = glyph.id;
|
||||
entry.glyphs.erase(id);
|
||||
entry.glyphs.emplace(id, makeMutable<Glyph>(std::move(glyph)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ std::vector<GeometryCollection> classifyRings(const GeometryCollection& rings) {
|
||||
|
||||
if (ccw == (area < 0 ? -1 : 1) && !polygon.empty()) {
|
||||
polygons.emplace_back(std::move(polygon));
|
||||
polygon = GeometryCollection();
|
||||
}
|
||||
|
||||
polygon.emplace_back(ring);
|
||||
|
||||
Reference in New Issue
Block a user