From b18e9c84ed179ff8c1a6e619336d1c07f6718f23 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Thu, 13 Mar 2014 21:28:29 +0400 Subject: [PATCH] Passing callbacks by reference --- libuavcan/include/uavcan/server.hpp | 2 +- libuavcan/include/uavcan/subscriber.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libuavcan/include/uavcan/server.hpp b/libuavcan/include/uavcan/server.hpp index cf7ad585c6..ac8955a280 100644 --- a/libuavcan/include/uavcan/server.hpp +++ b/libuavcan/include/uavcan/server.hpp @@ -67,7 +67,7 @@ public: StaticAssert::check(); } - int start(Callback callback) + int start(const Callback& callback) { stop(); diff --git a/libuavcan/include/uavcan/subscriber.hpp b/libuavcan/include/uavcan/subscriber.hpp index 7ff0fd0950..1310066edc 100644 --- a/libuavcan/include/uavcan/subscriber.hpp +++ b/libuavcan/include/uavcan/subscriber.hpp @@ -43,7 +43,7 @@ public: StaticAssert::check(); } - int start(Callback callback) + int start(const Callback& callback) { stop();