Skip to content
Snippets Groups Projects
Commit 236d43d0 authored by Florian Fischer's avatar Florian Fischer
Browse files

[io/Future] take a const reference of the Future::Callback

parent 385ec1c3
No related branches found
No related tags found
1 merge request!163[io/Future] take a const reference of the Future::Callback
......@@ -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));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment