[libsigcplusplus] limit_derived_target: Make constructors explicit.



commit 69f2c14d77227bc9bce0d2bebed95fa952e9bf96
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Apr 1 17:12:41 2016 +0200

    limit_derived_target: Make constructors explicit.
    
    Found by cppcheck.

 sigc++/visit_each.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/visit_each.h b/sigc++/visit_each.h
index 7d4f27d..d310821 100644
--- a/sigc++/visit_each.h
+++ b/sigc++/visit_each.h
@@ -70,7 +70,7 @@ struct limit_derived_target
       T_type, T_self>::execute_(std::forward<T_type>(_A_type), *this);
   }
 
-  limit_derived_target(const T_action& _A_action) : action_(_A_action) {}
+  explicit limit_derived_target(const T_action& _A_action) : action_(_A_action) {}
 
   T_action action_;
 };
@@ -110,7 +110,7 @@ struct limit_derived_target<T_target*, T_action>
       T_type, T_self>::execute_(std::forward<T_type>(_A_type), *this);
   }
 
-  limit_derived_target(const T_action& _A_action) : action_(_A_action) {}
+  explicit limit_derived_target(const T_action& _A_action) : action_(_A_action) {}
 
   T_action action_;
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]