0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::fmt: Add more string types for the %s specifier here for now.

This commit is contained in:
Jason Volk 2017-10-15 21:20:25 -07:00
parent ddc0443edb
commit 08b961351d

View file

@ -89,9 +89,12 @@ struct string_specifier
static const std::tuple static const std::tuple
< <
const char *, const char *,
ircd::string_view, std::string,
std::string_view, std::string_view,
std::string ircd::string_view,
ircd::json::string,
ircd::json::object,
ircd::json::array
> >
types; types;
@ -769,7 +772,10 @@ fmt::generate_string(char *&out,
const auto &ptr(get<0>(val)); const auto &ptr(get<0>(val));
const auto &type(get<1>(val)); const auto &type(get<1>(val));
if(type == typeid(ircd::string_view)) if(type == typeid(ircd::string_view) ||
type == typeid(ircd::json::string) ||
type == typeid(ircd::json::object) ||
type == typeid(ircd::json::array))
{ {
const auto &str(*static_cast<const ircd::string_view *>(ptr)); const auto &str(*static_cast<const ircd::string_view *>(ptr));
return karma::generate(out, gen, str); return karma::generate(out, gen, str);