diff options
author | Chris Johns <chrisj@rtems.org> | 2014-09-10 11:14:06 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-09-10 11:14:06 +1000 |
commit | a42e45957c2e9fd25e3b30c9aaeb33671754ad1c (patch) | |
tree | b088a041964b65fdf4cc3da655b02920aec7acfe | |
parent | 6cfee6a10df3b3d5d4fd5de55215506641dd82c9 (diff) |
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.
-rw-r--r-- | rld.cpp | 4 | ||||
-rw-r--r-- | rld.h | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -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. |