diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
commit | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch) | |
tree | b34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/JavaScriptCore/wtf/StdLibExtras.h | |
parent | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff) | |
download | qtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz |
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/JavaScriptCore/wtf/StdLibExtras.h')
-rw-r--r-- | Source/JavaScriptCore/wtf/StdLibExtras.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/wtf/StdLibExtras.h b/Source/JavaScriptCore/wtf/StdLibExtras.h index e4d7c8fc0..2a0a9f950 100644 --- a/Source/JavaScriptCore/wtf/StdLibExtras.h +++ b/Source/JavaScriptCore/wtf/StdLibExtras.h @@ -114,6 +114,11 @@ inline bool isPointerAligned(void* p) return !((intptr_t)(p) & (sizeof(char*) - 1)); } +inline bool is8ByteAligned(void* p) +{ + return !((uintptr_t)(p) & (sizeof(double) - 1)); +} + /* * C++'s idea of a reinterpret_cast lacks sufficient cojones. */ @@ -292,6 +297,7 @@ inline void* operator new(size_t, NotNullTag, void* location) using WTF::KB; using WTF::isPointerAligned; +using WTF::is8ByteAligned; using WTF::binarySearch; using WTF::bitwise_cast; using WTF::safeCast; |