diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-22 09:34:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-22 09:41:47 +0100 |
commit | 70a6b9ffbd676a1384433a86205d2cd4f2d4f4b1 (patch) | |
tree | ffb31ef817b5f2037cf7c332da422b9179d613d5 /sal/inc/osl/diagnose.hxx | |
parent | f2972242673cc9608960e9ca70e82766be5275e3 (diff) |
New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros.
* New SAL_STREAM supersedes OSL_FORMAT.
* oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now).
* TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site
cleanup).
* Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet
addressed.
* Some replacements tools String -> rtl::OUString.
Diffstat (limited to 'sal/inc/osl/diagnose.hxx')
-rw-r--r-- | sal/inc/osl/diagnose.hxx | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/sal/inc/osl/diagnose.hxx b/sal/inc/osl/diagnose.hxx index a9aba130d72b..42e4b8dd7f2f 100644 --- a/sal/inc/osl/diagnose.hxx +++ b/sal/inc/osl/diagnose.hxx @@ -25,27 +25,22 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#if ! defined(OSL_DIAGNOSE_HXX_INCLUDED) +#ifndef OSL_DIAGNOSE_HXX_INCLUDED #define OSL_DIAGNOSE_HXX_INCLUDED -#if ! defined(_OSL_DIAGNOSE_H_) +#include "sal/config.h" + +#include <functional> +#include <typeinfo> + +#include "boost/unordered_set.hpp" #include "osl/diagnose.h" -#endif -#if ! defined(_OSL_INTERLOCK_H_) #include "osl/interlck.h" -#endif -#if ! defined(_OSL_MUTEX_HXX_) #include "osl/mutex.hxx" -#endif -#if ! defined(INCLUDED_RTL_ALLOCATOR_HXX) #include "rtl/allocator.hxx" -#endif -#if ! defined(_RTL_INSTANCE_HXX_) #include "rtl/instance.hxx" -#endif -#include <boost/unordered_set.hpp> -#include <functional> -#include <typeinfo> +#include "sal/log.h" +#include "sal/types.h" namespace osl { /// @internal @@ -126,7 +121,7 @@ public: VoidPointerSet::const_iterator iPos(m_data.m_addresses.begin()); VoidPointerSet::const_iterator const iEnd(m_data.m_addresses.end()); for ( ; iPos != iEnd; ++iPos ) { - OSL_ASSERT( *iPos != 0 ); + SAL_WARN_IF( *iPos == 0, "sal.debug", "null pointer" ); } } return bRet; @@ -179,7 +174,7 @@ public: static bool checkObjectCount( ::std::size_t = 0 ) { return true; } #else // OSL_DEBUG_LEVEL > 0 /** @return whether the expected number of objects is alive, - else this function OSL_ASSERTs + else this function SAL_WARNs */ static bool checkObjectCount( ::std::size_t nExpected = 0 ) { return StaticObjectRegistry::get().checkObjectCount(nExpected); |