Patch [#33196] Warning Fixes 11-16-2012
[blender.git] / intern / memutil / MEM_CacheLimiter.h
index cfff5d10e4fa2e289ff90144267c4713ba3e4f57..daf66dc05b1f6304ffea383196363c01a227385b 100644 (file)
@@ -247,8 +247,10 @@ private:
                        if (!elem->can_destroy())
                                continue;
 
-                       /* by default 0 means higherst priority element */
-                       int priority = -(queue.size() - i - 1);
+                       /* by default 0 means highest priority element */
+                       /* casting a size type to int is questionable,
+                          but unlikely to cause problems */
+                       int priority = -((int)(queue.size()) - i - 1);
                        priority = getItemPriority(elem->get()->get_data(), priority);
 
                        if (priority < best_match_priority || best_match_elem == NULL) {