0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::fmt: Remove cruft.

This commit is contained in:
Jason Volk 2018-05-30 08:45:11 -07:00
parent fd0648471f
commit b5104d6504

View file

@ -698,56 +698,6 @@ const
});
}
/*
if(type == typeid(const char[]))
{
const auto &i(reinterpret_cast<const char *>(ptr));
if(!try_lex_cast<ssize_t>(i))
throw illegal("The string literal value for integer specifier is not a valid integer");
const auto len(std::min(max, strlen(i)));
memcpy(out, i, len);
out += len;
return true;
}
if(type == typeid(const char *))
{
const auto &i(*reinterpret_cast<const char *const *>(ptr));
if(!try_lex_cast<ssize_t>(i))
throw illegal("The character buffer for integer specifier is not a valid integer");
const auto len(std::min(max, strlen(i)));
memcpy(out, i, len);
out += len;
return true;
}
if(type == typeid(const std::string))
{
const auto &i(*reinterpret_cast<const std::string *>(ptr));
if(!try_lex_cast<ssize_t>(i))
throw illegal("The string argument for integer specifier is not a valid integer");
const auto len(std::min(max, i.size()));
memcpy(out, i.data(), len);
out += len;
return true;
}
if(type == typeid(const string_view) || type == typeid(const std::string_view))
{
const auto &i(*reinterpret_cast<const std::string_view *>(ptr));
if(!try_lex_cast<ssize_t>(i))
throw illegal("The string argument for integer specifier is not a valid integer");
const auto len(std::min(max, i.size()));
memcpy(out, i.data(), len);
out += len;
return true;
}
*/
bool
fmt::string_specifier::operator()(char *&out,
const size_t &max,