From d5abc39e492e8240651f269e7cf38d446db02a09 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 29 Oct 2016 05:08:37 -0700 Subject: [PATCH] ircd::js: Template the string type passed to overloaded JS::CompileFunction() --- include/ircd/js/function.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/ircd/js/function.h b/include/ircd/js/function.h index 11fa494c0..e576632d9 100644 --- a/include/ircd/js/function.h +++ b/include/ircd/js/function.h @@ -45,11 +45,12 @@ struct function template js::value operator()(const js::object &, args&&...) const; // new function + template function(JS::AutoObjectVector &stack, const JS::CompileOptions &opts, const char *const &name, - const std::vector &args, - const std::string &src); + const std::vector &args, + const string_t &src); using root::root; explicit function(const value &); @@ -93,16 +94,17 @@ function::function(const value &val) } template +template function::function(JS::AutoObjectVector &stack, const JS::CompileOptions &opts, const char *const &name, - const std::vector &args, - const std::string &src) + const std::vector &args, + const string_t &src) :function::root::type{} { - std::vector argp(args.size()); + std::vector argp(args.size()); std::transform(begin(args), end(args), begin(argp), [] - (const std::string &arg) + (const string_t &arg) { return arg.data(); });