[core] Fix performance-no-automatic-move (bonus)
As reported by clang-tidy-10. We don't run clang-tidy-10 yet. We should probably consider moving the bots at some point so errors like this won't return.
This commit is contained in:
@@ -371,7 +371,7 @@ void SymbolLayout::prepareSymbols(const GlyphMap& glyphMap,
|
||||
WritingModeType writingMode,
|
||||
SymbolAnchorType textAnchor,
|
||||
TextJustifyType textJustify) {
|
||||
const Shaping result = getShaping(
|
||||
Shaping result = getShaping(
|
||||
/* string */ formattedText,
|
||||
/* maxWidth: ems */
|
||||
isPointPlacement ? layout->evaluate<TextMaxWidth>(zoom, feature, canonicalID) * util::ONE_EM : 0.0f,
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace expression {
|
||||
|
||||
EvaluationResult Any::evaluate(const EvaluationContext& params) const {
|
||||
for (const auto& input : inputs) {
|
||||
const EvaluationResult result = input->evaluate(params);
|
||||
EvaluationResult result = input->evaluate(params);
|
||||
if (!result) return result;
|
||||
if (result->get<bool>()) return EvaluationResult(true);
|
||||
}
|
||||
@@ -35,7 +35,7 @@ std::vector<optional<Value>> Any::possibleOutputs() const {
|
||||
|
||||
EvaluationResult All::evaluate(const EvaluationContext& params) const {
|
||||
for (const auto& input : inputs) {
|
||||
const EvaluationResult result = input->evaluate(params);
|
||||
EvaluationResult result = input->evaluate(params);
|
||||
if (!result) return result;
|
||||
if (!result->get<bool>()) return EvaluationResult(false);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Length::Length(std::unique_ptr<Expression> input_)
|
||||
}
|
||||
|
||||
EvaluationResult Length::evaluate(const EvaluationContext& params) const {
|
||||
const EvaluationResult value = input->evaluate(params);
|
||||
EvaluationResult value = input->evaluate(params);
|
||||
if (!value) return value;
|
||||
return value->match(
|
||||
[] (const std::string& s) {
|
||||
|
||||
Reference in New Issue
Block a user