diff --git a/emper/io/Future.hpp b/emper/io/Future.hpp index 463cad7bc90fa2dc82fa2566f9ee5420a5d7a3c9..b9c073232ab28cd091191b031b67cb7b916f06bb 100644 --- a/emper/io/Future.hpp +++ b/emper/io/Future.hpp @@ -233,7 +233,7 @@ class Future : public Logger<LogSubsystem::IO> { * @param callback Callback reference which is copied and executed on completion. * It gets passed the value causing the completion. */ - inline void setCallback(Callback& callback) { + inline void setCallback(const Callback& callback) { /* Call copy constructor */ setCallback(new Callback(callback)); } @@ -244,7 +244,7 @@ class Future : public Logger<LogSubsystem::IO> { * @param callback Callback rvalue which gets moved and executed on completion. * It gets passed the value causing the completion. */ - inline void setCallback(Callback&& callback) { + inline void setCallback(const Callback&& callback) { /* Call move constructor */ setCallback(new Callback(callback)); }