Title: [119088] trunk/Source/WebCore
Revision
119088
Author
[email protected]
Date
2012-05-31 04:54:18 -0700 (Thu, 31 May 2012)

Log Message

[Platform] Implementation of Decimal(int32_t) isn't portable.
https://bugs.webkit.org/show_bug.cgi?id=87941

Reviewed by Kent Tamura.

This patch changes negation of integer to make unsigned integer
in portable way.

No new tests. This patch doesn't change behavior.

* platform/Decimal.cpp:
(WebCore::Decimal::Decimal): Use uint64_t(-int64_t(i32)) instead of uint64_t(-i32)

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (119087 => 119088)


--- trunk/Source/WebCore/ChangeLog	2012-05-31 11:48:03 UTC (rev 119087)
+++ trunk/Source/WebCore/ChangeLog	2012-05-31 11:54:18 UTC (rev 119088)
@@ -1,3 +1,18 @@
+2012-05-31  Yoshifumi Inoue  <[email protected]>
+
+        [Platform] Implementation of Decimal(int32_t) isn't portable.
+        https://bugs.webkit.org/show_bug.cgi?id=87941
+
+        Reviewed by Kent Tamura.
+
+        This patch changes negation of integer to make unsigned integer
+        in portable way.
+
+        No new tests. This patch doesn't change behavior.
+
+        * platform/Decimal.cpp:
+        (WebCore::Decimal::Decimal): Use uint64_t(-int64_t(i32)) instead of uint64_t(-i32) 
+
 2012-05-31  Gyuyoung Kim  <[email protected]>
 
         [CMAKE][EFL] Remove unneeded include path

Modified: trunk/Source/WebCore/platform/Decimal.cpp (119087 => 119088)


--- trunk/Source/WebCore/platform/Decimal.cpp	2012-05-31 11:48:03 UTC (rev 119087)
+++ trunk/Source/WebCore/platform/Decimal.cpp	2012-05-31 11:54:18 UTC (rev 119088)
@@ -278,7 +278,7 @@
 }
 
 Decimal::Decimal(int32_t i32)
-    : m_data(i32 < 0 ? Negative : Positive, 0, static_cast<uint32_t>(i32 < 0 ? -i32 : i32))
+    : m_data(i32 < 0 ? Negative : Positive, 0, i32 < 0 ? static_cast<uint64_t>(-static_cast<int64_t>(i32)) : static_cast<uint64_t>(i32))
 {
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to