Kaydet (Commit) c1e32083 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski

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/70465Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
üst 15bdba65
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment