formatting

This commit is contained in:
Günter Obiltschnig 2021-04-14 19:25:03 +02:00
parent ce7e6eeea0
commit a8e11be069

View File

@ -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";
case FMT_ON_OFF:
if (value == true)
return "on";
return "off";
case FMT_YES_NO:
return value ? "yes" : "no";
case FMT_ON_OFF:
return value ? "on" : "off";
default: // including FMT_TRUE_FALSE:
return value ? "true" : "false";
}
}