diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 12:41:20 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:49 +0100 |
commit | 3abb11b346ff34d501575e67aaf532aca18dddba (patch) | |
tree | 5b80724860a807c8d3d3d160067dccbf0826a371 /include/tools | |
parent | 6eeee04bad507a1194bac9709ce4f00322762477 (diff) |
Use bool
Change-Id: I7b48d8b9e162f9e4447bfcfcc0bbd1158bd35f5b
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/debug.hxx | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/include/tools/debug.hxx b/include/tools/debug.hxx index 5d8a7d809c67..7279845db3d8 100644 --- a/include/tools/debug.hxx +++ b/include/tools/debug.hxx @@ -76,11 +76,11 @@ typedef void (*DbgTestSolarMutexProc)(); struct DbgData { sal_uIntPtr nTestFlags; - sal_uIntPtr bOverwrite; + bool bOverwrite; sal_uIntPtr nTraceOut; sal_uIntPtr nWarningOut; sal_uIntPtr nErrorOut; - sal_uIntPtr bHookOSLAssert; + bool bHookOSLAssert; sal_Char aDebugName[260]; sal_Char aInclFilter[512]; sal_Char aExclFilter[512]; @@ -187,7 +187,7 @@ inline bool DbgFilterMessage( const char* pMsg ) return (bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg ); } -inline int DbgIsAllErrorOut() +inline bool DbgIsAllErrorOut() { return (DbgFunc( DBG_FUNC_ALLERROROUT ) != 0); } @@ -202,31 +202,22 @@ inline void DbgSaveData( const DbgData& rData ) DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData ); } -inline sal_uIntPtr DbgIsTraceOut() +inline bool DbgIsTraceOut() { DbgData* pData = DbgGetData(); - if ( pData ) - return (pData->nTraceOut != DBG_OUT_NULL); - else - return sal_False; + return pData && pData->nTraceOut != DBG_OUT_NULL; } -inline sal_uIntPtr DbgIsWarningOut() +inline bool DbgIsWarningOut() { DbgData* pData = DbgGetData(); - if ( pData ) - return (pData->nWarningOut != DBG_OUT_NULL); - else - return sal_False; + return pData && pData->nWarningOut != DBG_OUT_NULL; } -inline sal_uIntPtr DbgIsErrorOut() +inline bool DbgIsErrorOut() { DbgData* pData = DbgGetData(); - if ( pData ) - return (pData->nErrorOut != DBG_OUT_NULL); - else - return sal_False; + return pData && pData->nErrorOut != DBG_OUT_NULL; } inline sal_uIntPtr DbgGetErrorOut() // Testtool: test whether to collect OSL_ASSERTions as well @@ -238,12 +229,12 @@ inline sal_uIntPtr DbgGetErrorOut() // Testtool: test whether to collect OSL_A return DBG_OUT_NULL; } -inline sal_uIntPtr DbgIsAssertWarning() +inline bool DbgIsAssertWarning() { return DbgIsWarningOut(); } -inline sal_uIntPtr DbgIsAssert() +inline bool DbgIsAssert() { return DbgIsErrorOut(); } |