Changeset 142463 in webkit


Ignore:
Timestamp:
Feb 11, 2013 6:43:33 AM (11 years ago)
Author:
zandobersek@gmail.com
Message:

[GTK][Clang] Build errors in LocalizedStringsGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=109418

Reviewed by Philippe Normand.

Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
methods by including the WTF MathExtras.h header. Use a static cast to
an integer type on the float return value of the abs(float) method call
instead of the C-style cast.

No new tests - no new functiolnality.

  • platform/gtk/LocalizedStringsGtk.cpp:

(WebCore::localizedMediaTimeDescription):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142462 r142463  
     12013-02-11  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK][Clang] Build errors in LocalizedStringsGtk.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=109418
     5
     6        Reviewed by Philippe Normand.
     7
     8        Use the C++ isfinite(float) and abs(float) (instead of fabsf(float))
     9        methods by including the WTF MathExtras.h header. Use a static cast to
     10        an integer type on the float return value of the abs(float) method call
     11        instead of the C-style cast.
     12
     13        No new tests - no new functiolnality.
     14
     15        * platform/gtk/LocalizedStringsGtk.cpp:
     16        (WebCore::localizedMediaTimeDescription):
     17
    1182013-02-11  Zan Dobersek  <zdobersek@igalia.com>
    219
  • trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp

    r142400 r142463  
    3535#include "IntSize.h"
    3636#include "NotImplemented.h"
     37#include <wtf/MathExtras.h>
    3738#include <wtf/text/CString.h>
    3839#include <wtf/text/WTFString.h>
     
    4041#include <glib/gi18n-lib.h>
    4142#include <gtk/gtk.h>
    42 #include <math.h>
    4343
    4444namespace WebCore {
     
    627627        return String::fromUTF8(_("indefinite time"));
    628628
    629     int seconds = (int)fabsf(time);
     629    int seconds = static_cast<int>(abs(time));
    630630    int days = seconds / (60 * 60 * 24);
    631631    int hours = seconds / (60 * 60);
Note: See TracChangeset for help on using the changeset viewer.