Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: runtime/platform/utils.h

Issue 139043003: - Address warnings about 64-bit to 32-bit conversions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/utils.h
===================================================================
--- runtime/platform/utils.h (revision 31864)
+++ runtime/platform/utils.h (working copy)
@@ -45,34 +45,34 @@
}
template<typename T>
- static inline bool IsAligned(T x, int n) {
+ static inline bool IsAligned(T x, intptr_t n) {
ASSERT(IsPowerOfTwo(n));
return (x & (n - 1)) == 0;
}
template<typename T>
- static inline bool IsAligned(T* x, int n) {
+ static inline bool IsAligned(T* x, intptr_t n) {
return IsAligned(reinterpret_cast<uword>(x), n);
}
template<typename T>
- static inline T RoundDown(T x, int n) {
+ static inline T RoundDown(T x, intptr_t n) {
ASSERT(IsPowerOfTwo(n));
return (x & -n);
}
template<typename T>
- static inline T* RoundDown(T* x, int n) {
+ static inline T* RoundDown(T* x, intptr_t n) {
return reinterpret_cast<T*>(RoundDown(reinterpret_cast<uword>(x), n));
}
template<typename T>
- static inline T RoundUp(T x, int n) {
+ static inline T RoundUp(T x, intptr_t n) {
return RoundDown(x + n - 1, n);
}
template<typename T>
- static inline T* RoundUp(T* x, int n) {
+ static inline T* RoundUp(T* x, intptr_t n) {
return reinterpret_cast<T*>(RoundUp(reinterpret_cast<uword>(x), n));
}
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698