From 835b5a90af825816bd28fde544de1569b6141a23 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Thu, 18 Jun 2015 21:47:05 -0600 Subject: [PATCH] Reduce to_string overloads down to what is necessary --- include/chaiscript/dispatchkit/bootstrap.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/chaiscript/dispatchkit/bootstrap.hpp b/include/chaiscript/dispatchkit/bootstrap.hpp index d6600f4..8f2b3c7 100644 --- a/include/chaiscript/dispatchkit/bootstrap.hpp +++ b/include/chaiscript/dispatchkit/bootstrap.hpp @@ -191,11 +191,6 @@ namespace chaiscript m->add(constructor(), name); construct_pod(name, m); - auto to_s = fun(&to_string); - - if (!m->has_function(to_s, "to_string")) { - m->add(to_s, "to_string"); - } m->add(fun(&parse_string), "to_" + name); return m; } @@ -493,6 +488,9 @@ namespace chaiscript m->add(fun(&throw_exception), "throw"); m->add(fun(&what), "what"); + m->add(fun(&to_string), "to_string"); + m->add(fun(&Boxed_Number::to_string), "to_string"); + bootstrap_pod_type("double", m); bootstrap_pod_type("long_double", m); bootstrap_pod_type("float", m);