mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-02 07:31:37 +02:00
formatting
This commit is contained in:
parent
ce7e6eeea0
commit
a8e11be069
@ -38,19 +38,14 @@ 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:
|
case FMT_YES_NO:
|
||||||
if (value == true)
|
return value ? "yes" : "no";
|
||||||
return "yes";
|
|
||||||
return "no";
|
|
||||||
case FMT_ON_OFF:
|
case FMT_ON_OFF:
|
||||||
if (value == true)
|
return value ? "on" : "off";
|
||||||
return "on";
|
|
||||||
return "off";
|
default: // including FMT_TRUE_FALSE:
|
||||||
|
return value ? "true" : "false";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user