diff options
Diffstat (limited to 'intern/memutil')
-rw-r--r-- | intern/memutil/MEM_CacheLimiter.h | 6 | ||||
-rw-r--r-- | intern/memutil/MEM_SmartPtr.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/intern/memutil/MEM_CacheLimiter.h b/intern/memutil/MEM_CacheLimiter.h index cfff5d10e4f..daf66dc05b1 100644 --- a/intern/memutil/MEM_CacheLimiter.h +++ b/intern/memutil/MEM_CacheLimiter.h @@ -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) { diff --git a/intern/memutil/MEM_SmartPtr.h b/intern/memutil/MEM_SmartPtr.h index 09cf5c95854..dd19aae9db9 100644 --- a/intern/memutil/MEM_SmartPtr.h +++ b/intern/memutil/MEM_SmartPtr.h @@ -170,7 +170,7 @@ public : } /** - * Assignment operator - ownership is transfered from rhs to lhs. + * Assignment operator - ownership is transferred from rhs to lhs. * There is an intenional side-effect of function of transferring * ownership from the const parameter rhs. This is to insure * the 1-1 relationship. |