diff options
author | Rohan Kumar <rohankanojia420@gmail.com> | 2016-03-09 18:41:20 +0530 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-03-11 23:36:55 +0000 |
commit | b430ec96e3b131734239305715e2593dc4b57af2 (patch) | |
tree | 73af323c5d7c945b1aae20c6d05c2be6d9872b3c /forms | |
parent | 8dd5dbbb6ef27e7e5405e38761576a61f11a3b19 (diff) |
tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals and in some
places i replaced OSL_ENSURE(..) with assert()
Change-Id: Ide7e4b633e85a699f680f47caac5bff36bf180a2
Reviewed-on: https://gerrit.libreoffice.org/23076
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/xforms/model.cxx | 16 | ||||
-rw-r--r-- | forms/source/xforms/model.hxx | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index c56730331ca7..9d6b89ab1e5f 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -73,7 +73,7 @@ using namespace com::sun::star::xml::dom; using namespace xforms; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #define DBG_INVARIANT_TYPE(TYPE) class DBG_##TYPE { const TYPE* mpT; void check() { mpT->dbg_assertInvariant(); } public: DBG_##TYPE(const TYPE* pT) : mpT(pT) { check(); } ~DBG_##TYPE() { check(); } } _DBG_##TYPE(this); #define DBG_INVARIANT() DBG_INVARIANT_TYPE(Model) @@ -197,17 +197,17 @@ void Model::setExternalData( bool _bData ) mbExternalData = _bData; } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 void Model::dbg_assertInvariant() const { - OSL_ENSURE( mpInstances != NULL, "no instances found" ); - OSL_ENSURE( mxInstances.is(), "No instance container!" ); + assert(mpInstances && "no instances found"); + assert(mxInstances.is() && "No instance container!"); - OSL_ENSURE( mpBindings != NULL, "no bindings element" ); - OSL_ENSURE( mxBindings.is(), "No Bindings container" ); + assert(mpBindings && "no bindings element"); + assert(mxBindings.is() && "No Bindings container"); - OSL_ENSURE( mpSubmissions != NULL, "no submissions element" ); - OSL_ENSURE( mxSubmissions.is(), "No Submission container" ); + assert(mpSubmissions && "no submissions element"); + assert(mxSubmissions.is() && "No Submission container"); } #endif diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 222bb678d385..70e067c8834c 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -145,7 +145,7 @@ public: void setExternalData( bool _bData ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 void dbg_assertInvariant() const; #endif |