@@ -60,7 +60,7 @@ void AsyncFetcher::run()
6060 _isAsynchronous = true ;
6161 _requestSynchronous = false ;
6262
63- int previousCacheSize = getDiskLoads ();
63+ std:: size_t previousCacheSize = getDiskLoads ();
6464
6565 while (1 )
6666 {
@@ -76,7 +76,7 @@ void AsyncFetcher::run()
7676 }
7777 else
7878 {
79- const std::string& lpath = _sequence[_currentIndex];
79+ const std::string& lpath = _sequence[static_cast <std:: size_t >( _currentIndex) ];
8080
8181 // Load in cache
8282 if (_cache)
@@ -87,12 +87,12 @@ void AsyncFetcher::run()
8787 ratio = _resizeRatio;
8888 }
8989
90- _cache->get <image::RGBAfColor>(lpath, _currentIndex, ratio, false );
90+ _cache->get <image::RGBAfColor>(lpath, static_cast < unsigned int >( _currentIndex) , ratio, false );
9191 }
9292
9393 _currentIndex++;
9494
95- int size = _sequence.size ();
95+ int size = static_cast < int >( _sequence.size () );
9696 if (_currentIndex >= size)
9797 {
9898 _currentIndex = 0 ;
@@ -101,7 +101,7 @@ void AsyncFetcher::run()
101101 std::this_thread::sleep_for (1ms);
102102 }
103103
104- int cacheSize = getDiskLoads ();
104+ std:: size_t cacheSize = getDiskLoads ();
105105 if (cacheSize != previousCacheSize)
106106 {
107107 previousCacheSize = cacheSize;
@@ -118,22 +118,22 @@ void AsyncFetcher::stopAsync()
118118 _requestSynchronous = true ;
119119}
120120
121- void AsyncFetcher::updateCacheMemory (size_t maxMemory)
121+ void AsyncFetcher::updateCacheMemory (std:: size_t maxMemory)
122122{
123123 if (_cache)
124124 {
125125 _cache->updateMaxMemory (maxMemory);
126126 }
127127}
128128
129- size_t AsyncFetcher::getCacheSize () const
129+ std:: size_t AsyncFetcher::getCacheSize () const
130130{
131- return (_cache) ? _cache->info ().getContentSize () : 0 . 0f ;
131+ return (_cache) ? static_cast <std:: size_t >( _cache->info ().getContentSize ()) : 0 ;
132132}
133133
134- size_t AsyncFetcher::getDiskLoads () const
134+ std:: size_t AsyncFetcher::getDiskLoads () const
135135{
136- return (_cache) ? _cache->info ().getLoadFromDisk () : 0 . 0f ;
136+ return (_cache) ? static_cast <std:: size_t >( _cache->info ().getLoadFromDisk ()) : 0 ;
137137}
138138
139139QVariantList AsyncFetcher::getCachedFrames () const
@@ -209,11 +209,11 @@ bool AsyncFetcher::getFrame(const std::string& path,
209209 bool onlyCache = _isAsynchronous;
210210
211211 // Upgrade the thread with the current Index
212- for (int idx = 0 ; idx < _sequence.size (); ++idx)
212+ for (std:: size_t idx = 0 ; idx < _sequence.size (); ++idx)
213213 {
214214 if (_sequence[idx] == path)
215215 {
216- _currentIndex = idx;
216+ _currentIndex = static_cast < int >( idx) ;
217217 break ;
218218 }
219219 }
0 commit comments