resolve -Wunused-lambda-capture warning (clang)
Was: [ 45%/256/3/557,1168.424] Building CXX object src/CMakeFiles/wesnoth-game.dir/formula/variant.cpp.o ../src/formula/variant.cpp:647:68: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 + v2; }); ^ ../src/formula/variant.cpp:653:68: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 - v2; }); ^ ../src/formula/variant.cpp:659:68: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 * v2; }); ^ ../src/formula/variant.cpp:665:68: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 / v2; }); ^ 4 warnings generated.
This commit is contained in:
parent
9fe45ce42f
commit
cc1f33a32b
1 changed files with 4 additions and 4 deletions
|
@ -644,25 +644,25 @@ bool variant::operator>(const variant& v) const
|
|||
variant variant::list_elements_add(const variant& v) const
|
||||
{
|
||||
must_both_be(VARIANT_TYPE::TYPE_LIST, v);
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 + v2; });
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [](variant& v1, variant& v2) { return v1 + v2; });
|
||||
}
|
||||
|
||||
variant variant::list_elements_sub(const variant& v) const
|
||||
{
|
||||
must_both_be(VARIANT_TYPE::TYPE_LIST, v);
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 - v2; });
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [](variant& v1, variant& v2) { return v1 - v2; });
|
||||
}
|
||||
|
||||
variant variant::list_elements_mul(const variant& v) const
|
||||
{
|
||||
must_both_be(VARIANT_TYPE::TYPE_LIST, v);
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 * v2; });
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [](variant& v1, variant& v2) { return v1 * v2; });
|
||||
}
|
||||
|
||||
variant variant::list_elements_div(const variant& v) const
|
||||
{
|
||||
must_both_be(VARIANT_TYPE::TYPE_LIST, v);
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [this](variant& v1, variant& v2) { return v1 / v2; });
|
||||
return value_cast<game_logic::variant_list>()->list_op(v.value_, [](variant& v1, variant& v2) { return v1 / v2; });
|
||||
}
|
||||
|
||||
variant variant::concatenate(const variant& v) const
|
||||
|
|
Loading…
Add table
Reference in a new issue