⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185786 in webkit


Ignore:
Timestamp:
Jun 19, 2015, 6:24:55 PM (11 years ago)
Author:
Michael Catanzaro
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r185784 r185786  
     12015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        Fix absolute value warning in LocalizedStringsGtk.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=145919
     5
     6        Reviewed by Martin Robinson.
     7
     8        Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
     9        warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
     10        to an int is silly.
     11
     12        * platform/gtk/LocalizedStringsGtk.cpp:
     13        (WebCore::localizedMediaTimeDescription):
     14
    1152015-06-19  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp

    r185502 r185786  
    665665        return String::fromUTF8(_("indefinite time"));
    666666
    667     int seconds = static_cast<int>(abs(time));
     667    int seconds = abs(static_cast<int>(time));
    668668    int days = seconds / (60 * 60 * 24);
    669669    int hours = seconds / (60 * 60);
Note: See TracChangeset for help on using the changeset viewer.