summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorMatthias Huetsch <mhu@openoffice.org>2001-11-26 20:20:36 +0000
committerMatthias Huetsch <mhu@openoffice.org>2001-11-26 20:20:36 +0000
commit1700c8d3ed0eaafd76c87aa5317880148b01d9bc (patch)
tree1579ab2ed3ba248cafd5bcf304479285b686fe68 /store
parent7f9fd508495e521eb87a664b24d449a4450c34ec (diff)
#95272# #i1750# Compile internal debug functions conditionally, only.
Diffstat (limited to 'store')
-rw-r--r--store/source/storcach.cxx23
1 files changed, 15 insertions, 8 deletions
diff --git a/store/source/storcach.cxx b/store/source/storcach.cxx
index 86d1d936e577..6e717b0312b0 100644
--- a/store/source/storcach.cxx
+++ b/store/source/storcach.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: storcach.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mhu $ $Date: 2001-03-13 20:54:25 $
+ * last change: $Author: mhu $ $Date: 2001-11-26 21:20:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,7 +59,7 @@
*
************************************************************************/
-#define _STORE_STORCACH_CXX "$Revision: 1.2 $"
+#define _STORE_STORCACH_CXX "$Revision: 1.3 $"
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
@@ -247,6 +247,8 @@ struct OStorePageCacheEntry
* OStorePageCache debug internals.
*
*======================================================================*/
+#ifdef __STORE_CACHE_DEBUG
+
/*
* __store_check_entry.
*/
@@ -292,6 +294,8 @@ static sal_uInt16 __store_find_entry (
return ((sal_uInt16)(-1));
}
+#endif /* __STORE_CACHE_DEBUG */
+
/*========================================================================
*
* OStorePageCache implementation.
@@ -324,7 +328,11 @@ OStorePageCache::OStorePageCache (sal_uInt16 nPages)
*/
OStorePageCache::~OStorePageCache (void)
{
+#ifdef DEBUG
double x = hitRatio();
+ x = 0;
+#endif /* DEBUG */
+
for (sal_uInt16 i = 0; i < m_nSize; i++)
delete m_pData[i];
}
@@ -386,11 +394,11 @@ void OStorePageCache::move (sal_uInt16 nSI, sal_uInt16 nDI)
m_pData[nDI] = p;
m_pData[nDI]->index(nDI);
-#if 0 /* DEBUG */
+#ifdef __STORE_CACHE_DEBUG
OSL_POSTCOND(
__store_check_entry(&m_pData[0], m_nUsed),
"OStorePageCache::move(): check_entry() failed");
-#endif /* DEBUG */
+#endif /* __STORE_CACHE_DEBUG */
}
/*
@@ -403,11 +411,11 @@ storeError OStorePageCache::insert (
OStorePageBIOS &rBIOS,
InsertMode eMode)
{
-#if 0 /* DEBUG */
+#ifdef __STORE_CACHE_DEBUG
OSL_PRECOND(
__store_check_entry(&m_pData[0], m_nUsed),
"OStorePageCache::insert(): check_entry() failed");
-#endif /* DEBUG */
+#endif /* __STORE_CACHE_DEBUG */
entry::CompareResult result = entry::COMPARE_EQUAL;
if (nDI < m_nUsed)
@@ -684,4 +692,3 @@ storeError OStorePageCache::flush (
// Leave.
STORE_METHOD_LEAVE(pMutex, store_E_None);
}
-