diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-01-26 13:57:34 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-04-14 09:15:45 (GMT) |
commit | 290bc1e55ee3093cadc2addfd2ea29826ee91e87 (patch) | |
tree | 3ed7e29f80fc2fcc805ea00f0df6c7eff3cf82b3 /src/corelib/kernel | |
parent | 0d3044b547614cbd313d90021606af1f81fb10de (diff) | |
download | Qt-290bc1e55ee3093cadc2addfd2ea29826ee91e87.zip Qt-290bc1e55ee3093cadc2addfd2ea29826ee91e87.tar.gz Qt-290bc1e55ee3093cadc2addfd2ea29826ee91e87.tar.bz2 |
Move the constants up, preparing for refactoring
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qabstracteventdispatcher.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index b1b1380..06b76c9 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -49,6 +49,11 @@ QT_BEGIN_NAMESPACE // we allow for 2^24 = 8^8 = 16777216 simultaneously running timers +static const int TimerIdMask = 0x00ffffff; +static const int TimerSerialMask = ~TimerIdMask & ~0x80000000; +static const int TimerSerialCounter = TimerIdMask + 1; +static const int MaxTimerId = TimerSerialCounter - 1; + enum { NumberOfBuckets = 8, FirstBucketSize = 32 }; static const int BucketSize[NumberOfBuckets] = @@ -81,10 +86,6 @@ Q_DESTRUCTOR_FUNCTION(timerIdsDestructorFunction) static QBasicAtomicInt nextFreeTimerId = Q_BASIC_ATOMIC_INITIALIZER(1); -static const int TimerIdMask = 0x00ffffff; -static const int TimerSerialMask = ~TimerIdMask & ~0x80000000; -static const int TimerSerialCounter = TimerIdMask + 1; - // avoid the ABA-problem by using 7 of the top 8 bits of the timerId as a serial number static inline int prepareNewValueWithSerialNumber(int oldId, int newId) { |