mirror of
https://git.rtems.org/rtems-tools/
synced 2025-06-12 09:23:51 +08:00
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:
parent
b7ad4a2431
commit
30a7f069e7
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user