1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Add support for bool formatting

This commit is contained in:
2014-05-17 16:57:39 -07:00
parent 1baefdd0f2
commit 63557352f2
2 changed files with 9 additions and 0 deletions

View File

@ -485,3 +485,8 @@ PL_FORMAT_IMPL(const std::wstring &)
{
return _formatString(format, plString::FromWchar(value.c_str(), value.size()).ToUtf8());
}
PL_FORMAT_IMPL(bool)
{
return PL_FORMAT_FORWARD(format, value ? "true" : "false");
}

View File

@ -170,6 +170,10 @@ PL_FORMAT_TYPE(const std::wstring &)
// TODO: Implement floating point types (float, double). They're harder
// than the others, so I'll get around to them later >.>
// Formats as "true" or "false", following normal string formatting rules.
// To use other formats, don't pass us a bool directly...
PL_FORMAT_TYPE(bool)
// End of the chain -- emits the last piece (if any) and builds the final string
namespace plFormat_Private
{