mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Remove debugging statements for duplicate function entries
This commit is contained in:
parent
682c572eea
commit
c7c6f215b0
@ -31,24 +31,15 @@ namespace dispatchkit
|
||||
m_scopes.push_back(Scope());
|
||||
}
|
||||
|
||||
void register_function(const boost::shared_ptr<Proxy_Function> &f, const std::string &name)
|
||||
bool register_function(const boost::shared_ptr<Proxy_Function> &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<typename Function>
|
||||
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<Proxy_Function>(new Proxy_Function_Impl<Function>(func)), name))
|
||||
{
|
||||
std::cout << "Unable to add function: " << name
|
||||
<< " another function with the exact signature exists." << std::endl;
|
||||
}
|
||||
return add_function(boost::shared_ptr<Proxy_Function>(new Proxy_Function_Impl<Function>(func)), name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user