[Libreoffice-commits] core.git: forms/source

Rohan Kumar rohankanojia420 at gmail.com
Fri Mar 11 23:37:19 UTC 2016


 forms/source/xforms/model.cxx |   16 ++++++++--------
 forms/source/xforms/model.hxx |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b430ec96e3b131734239305715e2593dc4b57af2
Author: Rohan Kumar <rohankanojia420 at gmail.com>
Date:   Wed Mar 9 18:41:20 2016 +0530

    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 at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index c567303..9d6b89a 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 222bb67..70e067c 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
 


More information about the Libreoffice-commits mailing list