mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-19 08:46:41 +01:00
formatting
This commit is contained in:
parent
ce7e6eeea0
commit
a8e11be069
@ -36,21 +36,16 @@ namespace Poco {
|
||||
|
||||
std::string NumberFormatter::format(bool value, BoolFormat format)
|
||||
{
|
||||
switch(format)
|
||||
switch (format)
|
||||
{
|
||||
default:
|
||||
case FMT_TRUE_FALSE:
|
||||
if (value == true)
|
||||
return "true";
|
||||
return "false";
|
||||
case FMT_YES_NO:
|
||||
if (value == true)
|
||||
return "yes";
|
||||
return "no";
|
||||
return value ? "yes" : "no";
|
||||
|
||||
case FMT_ON_OFF:
|
||||
if (value == true)
|
||||
return "on";
|
||||
return "off";
|
||||
return value ? "on" : "off";
|
||||
|
||||
default: // including FMT_TRUE_FALSE:
|
||||
return value ? "true" : "false";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user