From 30cf50e6af3183680bd6413573eecd95b1f4fbb5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 23 Nov 2021 14:25:16 -0500 Subject: SL-16094: Support ll_convert(const char*) and correspondingly, ll_convert(const wchar_t*). Now that we're using ll_convert() for single-argument stringize(arg), make sure it can efficiently handle the simple case of constructing a string from a const char pointer. --- indra/llcommon/llstring.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 54e3f9ee63..d94f549480 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -529,6 +529,13 @@ struct ll_convert_impl T operator()(const T& in) const { return in; } }; +// simple construction from char* +template +struct ll_convert_impl +{ + T operator()(const typename T::value_type* in) const { return { in }; } +}; + // specialize ll_convert_impl to return EXPR #define ll_convert_alias(TO, FROM, EXPR) \ template<> \ -- cgit v1.2.3