diff options
author | 2012-03-21 12:25:48 +0000 | |
---|---|---|
committer | 2012-03-21 12:25:48 +0000 | |
commit | 56d3a23c3e0a53777fb25898951718d44dd9c027 (patch) | |
tree | 3f219200c6976d09d215d11251e3b5719e508aea /include/core | |
parent | 599445130cbb6c4ed6ded7a01c8d9dafef7ace47 (diff) |
Cast the result of SK_OFFSETOF to size_t to match offsetof() and avoid narrowing conversion errors
git-svn-id: http://skia.googlecode.com/svn/trunk@3446 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkTypes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index a5844213d2..7963a7d1ae 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -204,7 +204,7 @@ static inline bool SkIsU16(long x) { ////////////////////////////////////////////////////////////////////////////// #ifndef SK_OFFSETOF - #define SK_OFFSETOF(type, field) ((char*)&(((type*)1)->field) - (char*)1) + #define SK_OFFSETOF(type, field) (size_t)((char*)&(((type*)1)->field) - (char*)1) #endif /** Returns the number of entries in an array (not a pointer) |