From 3c1871495e98ae77abe070a976179994ef741740 Mon Sep 17 00:00:00 2001 From: ponchio Date: Tue, 19 Mar 2013 19:46:24 +0000 Subject: [PATCH] fixed version problem --- wrap/gcache/cache.h | 4 ++-- wrap/gcache/controller.h | 2 +- wrap/gcache/token.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wrap/gcache/cache.h b/wrap/gcache/cache.h index 1d18bb87..f25ab1ea 100644 --- a/wrap/gcache/cache.h +++ b/wrap/gcache/cache.h @@ -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(); diff --git a/wrap/gcache/controller.h b/wrap/gcache/controller.h index 268a7d30..7c974887 100644 --- a/wrap/gcache/controller.h +++ b/wrap/gcache/controller.h @@ -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; diff --git a/wrap/gcache/token.h b/wrap/gcache/token.h index 00a92d5e..5c072e1a 100644 --- a/wrap/gcache/token.h +++ b/wrap/gcache/token.h @@ -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;