| commit | c1e320836b7dbcd9fe6ded8352355ea6101bd821 | [log] |
|---|---|---|
| author | Jan-Marek Glogowski <glogow@fbihome.de> | Tue Apr 09 16:53:52 2019 +0200 |
| committer | Jan-Marek Glogowski <glogow@fbihome.de> | Tue Apr 09 19:15:05 2019 +0200 |
| tree | 0bf5f5c3a9ff3b23af40b3cce60f104f0eaf8216 | |
| parent | 15bdba65394362e68f1b11f439674d2652bf4cda [diff] |
Add asserts to *Guard pointer constructors... ... as we can't drop them. IMHO it's still better then just a crash. Has to use NULL, as the API is pre-C++11 compatible. Change-Id: Idb4395d14a9185f4d7d1c2f048ad950518eef133 Reviewed-on: https://gerrit.libreoffice.org/70465 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
diff --git a/include/osl/mutex.hxx b/include/osl/mutex.hxx index c2ee448..5bcf0e5 100644 --- a/include/osl/mutex.hxx +++ b/include/osl/mutex.hxx
@@ -22,6 +22,7 @@ #include "osl/mutex.h" #include <cassert> namespace osl { @@ -119,6 +120,7 @@ namespace osl */ Guard(T * pT_) : pT(pT_) { assert(pT != NULL); pT->acquire(); } @@ -153,6 +155,7 @@ namespace osl */ ClearableGuard(T * pT_) : pT(pT_) { assert(pT != NULL); pT->acquire(); }