[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

paroga at webkit.org paroga at webkit.org
Wed Dec 22 14:54:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 176b88c32b0ef75f6babe94995d21e4ade770b3c
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Oct 24 18:53:21 2010 +0000

    2010-10-24  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by David Kilzer.
    
            Inline WTF::bitwise_cast and fix style
            https://bugs.webkit.org/show_bug.cgi?id=48208
    
            * wtf/StdLibExtras.h:
            (WTF::bitwise_cast):
            (WTF::bitCount):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70419 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index ba4e5d5..92e9170 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-24  Patrick Gansterer  <paroga at webkit.org>
+
+        Reviewed by David Kilzer.
+
+        Inline WTF::bitwise_cast and fix style
+        https://bugs.webkit.org/show_bug.cgi?id=48208
+
+        * wtf/StdLibExtras.h:
+        (WTF::bitwise_cast):
+        (WTF::bitCount):
+
 2010-10-23  Xan Lopez  <xlopez at igalia.com>
 
         Reviewed by Sam Weinig.
diff --git a/JavaScriptCore/wtf/StdLibExtras.h b/JavaScriptCore/wtf/StdLibExtras.h
index d594c17..6e79c78 100644
--- a/JavaScriptCore/wtf/StdLibExtras.h
+++ b/JavaScriptCore/wtf/StdLibExtras.h
@@ -87,29 +87,29 @@ TypePtr reinterpret_cast_ptr(const void* ptr)
 
 namespace WTF {
 
-    /*
-     * C++'s idea of a reinterpret_cast lacks sufficient cojones.
-     */
-    template<typename TO, typename FROM>
-    TO bitwise_cast(FROM from)
-    {
-        COMPILE_ASSERT(sizeof(TO) == sizeof(FROM), WTF_bitwise_cast_sizeof_casted_types_is_equal);
-        union {
-            FROM from;
-            TO to;
-        } u;
-        u.from = from;
-        return u.to;
-    }
+/*
+ * C++'s idea of a reinterpret_cast lacks sufficient cojones.
+ */
+template<typename TO, typename FROM>
+inline TO bitwise_cast(FROM from)
+{
+    COMPILE_ASSERT(sizeof(TO) == sizeof(FROM), WTF_bitwise_cast_sizeof_casted_types_is_equal);
+    union {
+        FROM from;
+        TO to;
+    } u;
+    u.from = from;
+    return u.to;
+}
 
-    // Returns a count of the number of bits set in 'bits'.
-    inline size_t bitCount(unsigned bits)
-    {
-        bits = bits - ((bits >> 1) & 0x55555555);
-        bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);
-        return (((bits + (bits >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
-    }
+// Returns a count of the number of bits set in 'bits'.
+inline size_t bitCount(unsigned bits)
+{
+    bits = bits - ((bits >> 1) & 0x55555555);
+    bits = (bits & 0x33333333) + ((bits >> 2) & 0x33333333);
+    return (((bits + (bits >> 4)) & 0xF0F0F0F) * 0x1010101) >> 24;
+}
 
 } // namespace WTF
 
-#endif
+#endif // WTF_StdLibExtras_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list