Title: [185786] trunk/Source/WebCore
Revision
185786
Author
mcatanz...@igalia.com
Date
2015-06-19 18:24:55 -0700 (Fri, 19 Jun 2015)

Log Message

Fix absolute value warning in LocalizedStringsGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=145919

Reviewed by Martin Robinson.

Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
to an int is silly.

* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaTimeDescription):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (185785 => 185786)


--- trunk/Source/WebCore/ChangeLog	2015-06-20 00:51:52 UTC (rev 185785)
+++ trunk/Source/WebCore/ChangeLog	2015-06-20 01:24:55 UTC (rev 185786)
@@ -1,3 +1,17 @@
+2015-06-19  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        Fix absolute value warning in LocalizedStringsGtk.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=145919
+
+        Reviewed by Martin Robinson.
+
+        Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
+        warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
+        to an int is silly.
+
+        * platform/gtk/LocalizedStringsGtk.cpp:
+        (WebCore::localizedMediaTimeDescription):
+
 2015-06-19  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Highlight currently edited CSS selector

Modified: trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp (185785 => 185786)


--- trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2015-06-20 00:51:52 UTC (rev 185785)
+++ trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2015-06-20 01:24:55 UTC (rev 185786)
@@ -664,7 +664,7 @@
     if (!std::isfinite(time))
         return String::fromUTF8(_("indefinite time"));
 
-    int seconds = static_cast<int>(abs(time));
+    int seconds = abs(static_cast<int>(time));
     int days = seconds / (60 * 60 * 24);
     int hours = seconds / (60 * 60);
     int minutes = (seconds / 60) % 60;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to