mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-26 19:39:31 +00:00
Use std::move() instead of std::forward()
Std::forward() is intended to be used in reference-collapsing contexts (i.e. templates). @Vultraz said in Discord that the code doesn't compile with std::move(), but it compiles just fine for me with Visual Studio 2017.
This commit is contained in:
parent
3b81f06953
commit
468437666e
@ -1429,7 +1429,7 @@ function_symbol_table::function_symbol_table(std::shared_ptr<function_symbol_tab
|
||||
|
||||
void function_symbol_table::add_function(const std::string& name, formula_function_ptr&& fcn)
|
||||
{
|
||||
custom_formulas_.emplace(name, std::forward<formula_function_ptr>(fcn));
|
||||
custom_formulas_.emplace(name, std::move(fcn));
|
||||
}
|
||||
|
||||
expression_ptr function_symbol_table::create_function(
|
||||
|
Loading…
x
Reference in New Issue
Block a user