This fixes an (undocumented) oddity in ParameterHandler::print_parameters(): We
were at times looking at individual bits instead of just the declared values
of ParameterHandler::OutputStyle. This presumably allowed for calling that
function with a combination of the OutputStyle flags, for reasons that no
longer seem particularly relevant nor obvious.
This patch removes this possibility from the current implementation of
the function, but retains it for the (deprecated) function
ParameterHandler::print_parameters_section().
// the documentation, and then the actual entry; break the
// documentation into readable chunks such that the whole
// thing is at most 78 characters wide
- if ((!(style & 128)) &&
+ if ((style == Text) &&
!p->second.get<std::string>("documentation").empty())
{
if (first_entry == false)
// finally print the default value, but only if it differs
// from the actual value
- if ((!(style & 64)) && value != p->second.get<std::string>("default_value"))
+ if ((style == Text) && value != p->second.get<std::string>("default_value"))
{
out << std::setw(longest_value-value.length()+1) << ' '
<< "# ";
if ((style != Description)
&&
- (!(style & 128))
+ (style != ShortText)
&&
(n_parameters != 0)
&&
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams