fixed version problem

This commit is contained in:
Federico Ponchio 2013-03-19 19:46:24 +00:00
parent b178d19299
commit 3c1871495e
3 changed files with 7 additions and 7 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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;