Make the verbose take the level and return the level if valid.

This makes the verbose a single and removes the need to have the
logic of the test in the code.
This commit is contained in:
Chris Johns 2014-09-10 11:14:06 +10:00
parent b7ad4a2431
commit 30a7f069e7
2 changed files with 3 additions and 3 deletions

View File

@ -194,9 +194,9 @@ namespace rld
}
int
verbose ()
verbose (int level)
{
return verbose_level;
return verbose_level && (verbose_level >= level) ? verbose_level : 0;
}
const std::string

View File

@ -187,7 +187,7 @@ namespace rld
* Return the verbose level. Setting the flag more than once raises the
* level.
*/
int verbose ();
int verbose (int level = 0);
/**
* The version string.