PlatformTimeRanges::nearest() truncates closestDelta values from double to float
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Mar 2014 17:05:15 +0000 (17:05 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Mar 2014 17:05:15 +0000 (17:05 +0000)
commit32a43aefd7de03f3faf57fd8856cb7b94c4e1ce7
tree312a2837f9a7384d0cf008cc7e348abfe790233d
parent223164d9696df04d644f5e3c1becb1824315a684
PlatformTimeRanges::nearest() truncates closestDelta values from double to float
<http://webkit.org/b/130298>

Reviewed by Darin Adler.

Fixes the following build failures using trunk clang:

    WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
                closestDelta = fabsf(startTime - time);
                               ^
    WebCore/platform/graphics/PlatformTimeRanges.cpp:210:28: note: use function 'fabs' instead
                closestDelta = fabsf(startTime - time);
                               ^~~~~
                               fabs
    WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: error: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Werror,-Wabsolute-value]
                closestDelta = fabsf(endTime - time);
                               ^
    WebCore/platform/graphics/PlatformTimeRanges.cpp:214:28: note: use function 'fabs' instead
                closestDelta = fabsf(endTime - time);
                               ^~~~~
                               fabs

* platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::nearest): Extract start and end
time deltas into local variables so they don't have to be
computed twice, using fabs() instead of fabsf().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/PlatformTimeRanges.cpp