diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2022-05-07 17:40:28 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2022-05-07 17:40:28 +0000 |
commit | c16fbfe22073cd2a649edbd6304f6149497a7e6d (patch) | |
tree | 1b9356163cd1c105a6fa2d939e316cc1ecdf7cbc | |
parent | ee10c8387428fc461f2c4d3b01eab2aec77fc26a (diff) | |
download | VirtualBox-svn-c16fbfe22073cd2a649edbd6304f6149497a7e6d.tar.gz |
Main/AutoCaller.h: Add convenience wrapper isNotOk(), bugref:10223
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@94907 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r-- | src/VBox/Main/include/AutoCaller.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/VBox/Main/include/AutoCaller.h b/src/VBox/Main/include/AutoCaller.h index eeeaec44bfb..06b6fe66de7 100644 --- a/src/VBox/Main/include/AutoCaller.h +++ b/src/VBox/Main/include/AutoCaller.h @@ -117,6 +117,12 @@ public: bool isOk() const { return SUCCEEDED(mRC); } /** + * Returns |true| if |FAILED(rc())| is |true|, for convenience. + * |true| means the number of callers was _not_ successfully increased. + */ + bool isNotOk() const { return FAILED(mRC); } + + /** * Temporarily decreases the number of callers of the managed object. * May only be called if #isOk() returns |true|. Note that #rc() will * return E_FAIL after this method succeeds. |