fixed version problem
This commit is contained in:
parent
b178d19299
commit
3c1871495e
|
@ -202,7 +202,7 @@ protected:
|
|||
remove = this->heap.popMin();
|
||||
} else {
|
||||
last.count.testAndSetOrdered(Token::READY, Token::CACHE);
|
||||
#if(QT_VERSION < 0x05000000)
|
||||
#if(QT_VERSION < 0x050000)
|
||||
int last_count = last.count;
|
||||
#else
|
||||
int last_count = last.count.load();
|
||||
|
@ -254,7 +254,7 @@ protected:
|
|||
input->rebuild(); //if dirty rebuild
|
||||
if(input->heap.size()) { //we need something in input to tranfer.
|
||||
Token &first = input->heap.max();
|
||||
#if(QT_VERSION < 0x05000000)
|
||||
#if(QT_VERSION < 0x050000)
|
||||
int first_count = first.count;
|
||||
#else
|
||||
int first_count = first.count.load();
|
||||
|
|
|
@ -81,7 +81,7 @@ class Controller {
|
|||
|
||||
///start the various cache threads.
|
||||
void start() {
|
||||
if(!stopped) return;
|
||||
assert(stopped);
|
||||
assert(!paused);
|
||||
assert(caches.size() > 1);
|
||||
caches.back()->final = true;
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
bool remove() {
|
||||
count.testAndSetOrdered(READY, REMOVE);
|
||||
count.testAndSetOrdered(CACHE, REMOVE);
|
||||
#if(QT_VERSION < 0x05000000)
|
||||
#if(QT_VERSION < 0x050000)
|
||||
return count <= REMOVE;
|
||||
#else
|
||||
return count.load() <= REMOVE; //might have become OUSIDE in the meanwhile
|
||||
|
@ -72,7 +72,7 @@ public:
|
|||
}
|
||||
|
||||
bool isLocked() {
|
||||
#if(QT_VERSION < 0x05000000)
|
||||
#if(QT_VERSION < 0x050000)
|
||||
return count > 0;
|
||||
#else
|
||||
return count.load() > 0;
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
}
|
||||
|
||||
bool operator<(const Token &a) const {
|
||||
#if(QT_VERSION < 0x05000000)
|
||||
#if(QT_VERSION < 0x050000)
|
||||
if(count == a.count)
|
||||
return priority < a.priority;
|
||||
return count < a.count;
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
#endif
|
||||
}
|
||||
bool operator>(const Token &a) const {
|
||||
#if(QT_VERSION < 0x05000000)
|
||||
#if(QT_VERSION < 0x050000)
|
||||
if(count == a.count)
|
||||
return priority > a.priority;
|
||||
return count > a.count;
|
||||
|
|
Loading…
Reference in New Issue