summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcontiguouscache.h
diff options
context:
space:
mode:
authorIan Walters <ian.walters@nokia.com>2009-05-25 23:50:16 (GMT)
committerIan Walters <ian.walters@nokia.com>2009-05-25 23:50:16 (GMT)
commitf8cb8f242817c94a3f368b01243a88918d211f1e (patch)
tree8ea03a3fa3cc7770748d957ed2303732ab36c05d /src/corelib/tools/qcontiguouscache.h
parentafcd5b98b1855390e1c5c1308f0beff256391d96 (diff)
downloadQt-f8cb8f242817c94a3f368b01243a88918d211f1e.zip
Qt-f8cb8f242817c94a3f368b01243a88918d211f1e.tar.gz
Qt-f8cb8f242817c94a3f368b01243a88918d211f1e.tar.bz2
Protect dump function by ifdef.
Use the same pattern for protecting the dump function as qmap.h and qhash.h employ.
Diffstat (limited to 'src/corelib/tools/qcontiguouscache.h')
-rw-r--r--src/corelib/tools/qcontiguouscache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 5cd1582..2437f63 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -49,8 +49,10 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+#undef QT_QCONTIGUOUSCACHE_DEBUG
QT_MODULE(Core)
+
struct Q_CORE_EXPORT QContiguousCacheData
{
QBasicAtomicInt ref;
@@ -60,7 +62,9 @@ struct Q_CORE_EXPORT QContiguousCacheData
int offset;
uint sharable : 1;
+#ifdef QT_QCONTIGUOUSCACHE_DEBUG
void dump() const;
+#endif
};
template <typename T>
@@ -131,8 +135,10 @@ public:
{ return d->offset >= 0 && d->offset < INT_MAX - d->count && (d->offset % d->alloc) == d->start; }
inline void normalizeIndexes() { d->offset = d->start; }
- // debug
+
+#ifdef QT_QCONTIGUOUSCACHE_DEBUG
void dump() const { p->dump(); }
+#endif
private:
void detach_helper();