[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:
@@ -90,8 +90,8 @@ protected:
|
||||
template <typename TaskFn, typename ReplyFn>
|
||||
void scheduleAndReplyValue(const TaskFn& task,
|
||||
const ReplyFn& reply,
|
||||
const mapbox::base::WeakPtr<Scheduler>& replyScheduler) {
|
||||
auto scheduled = [replyScheduler, task, reply] {
|
||||
mapbox::base::WeakPtr<Scheduler> replyScheduler) {
|
||||
auto scheduled = [replyScheduler = std::move(replyScheduler), task, reply] {
|
||||
auto lock = replyScheduler.lock();
|
||||
if (!replyScheduler) return;
|
||||
auto scheduledReply = [reply, result = task()] { reply(result); };
|
||||
|
||||
@@ -49,8 +49,8 @@ private:
|
||||
|
||||
class Var : public Expression {
|
||||
public:
|
||||
Var(std::string name_, const std::shared_ptr<Expression>& value_)
|
||||
: Expression(Kind::Var, value_->getType()), name(std::move(name_)), value(value_) {}
|
||||
Var(std::string name_, std::shared_ptr<Expression> value_)
|
||||
: Expression(Kind::Var, value_->getType()), name(std::move(name_)), value(std::move(value_)) {}
|
||||
|
||||
static ParseResult parse(const mbgl::style::conversion::Convertible&, ParsingContext&);
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ class Literal : public Expression {
|
||||
public:
|
||||
Literal(const Value& value_) : Expression(Kind::Literal, typeOf(value_)), value(value_) {}
|
||||
|
||||
Literal(const type::Array& type_, std::vector<Value> value_) : Expression(Kind::Literal, type_), value(value_) {}
|
||||
Literal(const type::Array& type_, std::vector<Value> value_)
|
||||
: Expression(Kind::Literal, type_), value(std::move(value_)) {}
|
||||
|
||||
EvaluationResult evaluate(const EvaluationContext&) const override {
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user