diff options
author | John Newbery <john@johnnewbery.com> | 2019-12-15 12:44:09 -0300 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-12-15 13:24:48 -0300 |
commit | 492c6dc1e742a62599dc6d5ba6c3896825b5144f (patch) | |
tree | 662494520b876f6da7bbfb85c12ad46de249e92d /src/warnings.h | |
parent | 869b6314fd180856b6054fff28b5de994252c54c (diff) |
util: change GetWarnings parameter to bool
GetWarnings() changes the format of the output warning string based on a
passed-in string argument that can be set to "gui" or "statusbar".
Change the argument to a bool:
- there are only two types of behaviour, so a bool is a more natural
argument type
- changing the name to 'verbose' does not set any expectations for the
how the calling code will use the returned string (currently,
'statusbar' is used for RPC warnings, not a status bar)
- removes some error-handling code for when the passed-in string is not
one of the two strings expected.
Diffstat (limited to 'src/warnings.h')
-rw-r--r-- | src/warnings.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/warnings.h b/src/warnings.h index e6701ebd9e..58e5e4cd19 100644 --- a/src/warnings.h +++ b/src/warnings.h @@ -13,11 +13,11 @@ void SetfLargeWorkForkFound(bool flag); bool GetfLargeWorkForkFound(); void SetfLargeWorkInvalidChainFound(bool flag); /** Format a string that describes several potential problems detected by the core. - * @param[in] strFor can have the following values: - * - "statusbar": get the most important warning - * - "gui": get all warnings, translated (where possible) for GUI, separated by <hr /> - * @returns the warning string selected by strFor + * @param[in] verbose bool + * - if true, get all warnings, translated (where possible), separated by <hr /> + * - if false, get the most important warning + * @returns the warning string */ -std::string GetWarnings(const std::string& strFor); +std::string GetWarnings(bool verbose); #endif // BITCOIN_WARNINGS_H |