summaryrefslogtreecommitdiff
path: root/sal/cpprt
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-15 16:40:45 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-15 16:40:45 +0000
commit047b9cb79c678bc21f486d2d0b608a75ec59ca4a (patch)
treefb4ebed88222fd4216f70ba3b9479ebc7d434ced /sal/cpprt
parentbb14099a3ae636473759e0f7416723861a54050f (diff)
INTEGRATION: CWS dbgmacros1 (1.1.4.1.42); FILE MERGED
2003/04/09 12:08:11 kso 1.1.4.1.42.1: #108413# - debug macro unification.
Diffstat (limited to 'sal/cpprt')
-rw-r--r--sal/cpprt/operators_new_delete.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx
index d283c00b9d8d..41d4c6a409b8 100644
--- a/sal/cpprt/operators_new_delete.cxx
+++ b/sal/cpprt/operators_new_delete.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: operators_new_delete.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: hr $ $Date: 2003-03-26 16:45:33 $
+ * last change: $Author: vg $ $Date: 2003-04-15 17:40:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,30 +108,30 @@ struct AllocatorTraits
std::size_t size (std::size_t n) const SAL_THROW(())
{
n = std::max(n, std::size_t(1));
-#if defined(DEBUG) || defined(_DEBUG)
+#if OSL_DEBUG_LEVEL > 0
n += sizeof(signature_type);
-#endif /* DEBUG */
+#endif /* OSL_DEBUG_LEVEL */
return n;
}
void* init (void * p) const SAL_THROW(())
{
-#if defined(DEBUG) || defined(_DEBUG)
+#if OSL_DEBUG_LEVEL > 0
memcpy (p, m_signature, sizeof(signature_type));
p = static_cast<char*>(p) + sizeof(signature_type);
-#endif /* DEBUG */
+#endif /* OSL_DEBUG_LEVEL */
return p;
}
void* fini (void * p) const SAL_THROW(())
{
-#if defined(DEBUG) || defined(_DEBUG)
+#if OSL_DEBUG_LEVEL > 0
p = static_cast<char*>(p) - sizeof(signature_type);
if (memcmp (p, m_signature, sizeof(signature_type)) != 0)
{
OSL_ENSURE(0, "operator delete mismatch");
}
-#endif /* DEBUG */
+#endif /* OSL_DEBUG_LEVEL */
return p;
}
};