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