From c7c6f215b0a0def1099d31cf29ec7868fbb27f9a Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sat, 20 Jun 2009 17:23:23 +0000 Subject: [PATCH] Remove debugging statements for duplicate function entries --- dispatchkit/dispatchkit.hpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/dispatchkit/dispatchkit.hpp b/dispatchkit/dispatchkit.hpp index bc3d0a1a..2466f03b 100644 --- a/dispatchkit/dispatchkit.hpp +++ b/dispatchkit/dispatchkit.hpp @@ -31,24 +31,15 @@ namespace dispatchkit m_scopes.push_back(Scope()); } - void register_function(const boost::shared_ptr &f, const std::string &name) + bool register_function(const boost::shared_ptr &f, const std::string &name) { - if (!add_function(f, name)) - { - std::cout << "Unable to add function: " << name - << " another function with the exact signature exists." << std::endl; - } - } - + return add_function(f, name); + } template - void register_function(const Function &func, const std::string &name) + bool register_function(const Function &func, const std::string &name) { - if (!add_function(boost::shared_ptr(new Proxy_Function_Impl(func)), name)) - { - std::cout << "Unable to add function: " << name - << " another function with the exact signature exists." << std::endl; - } + return add_function(boost::shared_ptr(new Proxy_Function_Impl(func)), name); }