[libsigcplusplus] slot_do_bind/unbind: Make constructors explicit.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] slot_do_bind/unbind: Make constructors explicit.
- Date: Fri, 1 Apr 2016 15:55:16 +0000 (UTC)
commit 0d038ec77fe6e1f19e140e89a43f9fe9ecbe2e02
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 1 17:09:08 2016 +0200
slot_do_bind/unbind: Make constructors explicit.
Found by cppcheck.
sigc++/functors/slot_base.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/functors/slot_base.h b/sigc++/functors/slot_base.h
index 353ec57..56cabc8 100644
--- a/sigc++/functors/slot_base.h
+++ b/sigc++/functors/slot_base.h
@@ -164,7 +164,7 @@ struct SIGC_API slot_do_bind
/** Construct a slot_do_bind functor.
* @param rep The slot_rep object trackables should notify on destruction.
*/
- inline slot_do_bind(slot_rep* rep) noexcept : rep_(rep) {}
+ inline explicit slot_do_bind(slot_rep* rep) noexcept : rep_(rep) {}
/** Adds a dependency to @p t.
* @param t The trackable object to add a callback to.
@@ -184,7 +184,7 @@ struct SIGC_API slot_do_unbind
/** Construct a slot_do_unbind functor.
* @param rep The slot_rep object trackables don't need to notify on destruction any more.
*/
- inline slot_do_unbind(slot_rep* rep) noexcept : rep_(rep) {}
+ inline explicit slot_do_unbind(slot_rep* rep) noexcept : rep_(rep) {}
/** Removes a dependency from @p t.
* @param t The trackable object to remove the callback from.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]