]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsLoader.cpp
ctests: regex to revert two instant_preview tests
[lyx.git] / src / graphics / GraphicsLoader.cpp
index f635e0b321f6b8e625f53bf469d8811adce36779..4ec5c9aed92f50a3443a82741f9429bfa0eab199 100644 (file)
@@ -74,6 +74,7 @@ private:
 //static int s_numimages_ = 5;
 //static int s_millisecs_ = 500;
 
+// FIXME THREAD
 static int s_numimages_ = 10;
 static int s_millisecs_ = 500;
 
@@ -89,18 +90,17 @@ void LoaderQueue::loadNext()
        LYXERR(Debug::GRAPHICS, "LoaderQueue: "
                << cache_queue_.size() << " items in the queue");
        int counter = s_numimages_;
-       while (cache_queue_.size() && counter--) {
+       while (!cache_queue_.empty() && counter--) {
                Cache::ItemPtr ptr = cache_queue_.front();
                cache_set_.erase(ptr);
                cache_queue_.pop_front();
                if (ptr->status() == WaitingToLoad)
                        ptr->startLoading();
        }
-       if (!cache_queue_.empty()) {
+       if (!cache_queue_.empty())
                startLoader();
-       } else {
+       else
                stopLoader();
-       }
 }