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:
@ -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");
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user