mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-04-28 13:07:59 +03:00
Small fix for move_only_function. Can't trust ai fully yet hah
This commit is contained in:
parent
0f3929a3b0
commit
cfaab31a71
1 changed files with 2 additions and 2 deletions
4
vendor/librw/src/dc/rwdc.cpp
vendored
4
vendor/librw/src/dc/rwdc.cpp
vendored
|
@ -1036,7 +1036,7 @@ public:
|
|||
|
||||
// Templated constructor to accept any callable object.
|
||||
template <typename F>
|
||||
move_only_function(F f)
|
||||
move_only_function(F&& f)
|
||||
: callable_(new model<F>(std::move(f))) {}
|
||||
|
||||
// Move constructor.
|
||||
|
@ -1080,7 +1080,7 @@ private:
|
|||
template <typename F>
|
||||
struct model : concept_t {
|
||||
F f;
|
||||
explicit model(F f) : f(std::move(f)) {}
|
||||
explicit model(F&& f) : f(std::move(f)) {}
|
||||
R invoke(Args&&... args) override {
|
||||
return f(std::forward<Args>(args)...);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue