diff options
author | mateuszs <mateuszs@opera.com> | 2015-04-24 06:20:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-24 13:20:30 +0000 |
commit | 3371ab09fb14093f9f5f5db41a60d98b215217c1 (patch) | |
tree | ea9a957dc2f23cb0a80e85c44e2ac77c66b4cca7 | |
parent | 6fb4e15bef960a41144cb5abf366c1618afed07f (diff) | |
download | chromium_src-3371ab09fb14093f9f5f5db41a60d98b215217c1.zip chromium_src-3371ab09fb14093f9f5f5db41a60d98b215217c1.tar.gz chromium_src-3371ab09fb14093f9f5f5db41a60d98b215217c1.tar.bz2 |
Removed obsolete float_util.h as VS2013 supports standards well enough.
BUG=
Review URL: https://codereview.chromium.org/1076443002
Cr-Commit-Position: refs/heads/master@{#326781}
27 files changed, 49 insertions, 89 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn index 7750eee..710da4a 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -233,7 +233,6 @@ component("base") { "files/scoped_file.h", "files/scoped_temp_dir.cc", "files/scoped_temp_dir.h", - "float_util.h", "format_macros.h", "gtest_prod_util.h", "guid.cc", diff --git a/base/base.gypi b/base/base.gypi index a45a387..bbc3f60 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -227,7 +227,6 @@ 'files/scoped_file.h', 'files/scoped_temp_dir.cc', 'files/scoped_temp_dir.h', - 'float_util.h', 'format_macros.h', 'gtest_prod_util.h', 'guid.cc', diff --git a/base/float_util.h b/base/float_util.h deleted file mode 100644 index 9027310..0000000 --- a/base/float_util.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef BASE_FLOAT_UTIL_H_ -#define BASE_FLOAT_UTIL_H_ - -#include "build/build_config.h" - -#include <float.h> - -#include <cmath> - -namespace base { - -template <typename Float> -inline bool IsFinite(const Float& number) { -#if defined(OS_POSIX) - return std::isfinite(number) != 0; -#elif defined(OS_WIN) - return _finite(number) != 0; -#endif -} - -template <typename Float> -inline bool IsNaN(const Float& number) { -#if defined(OS_POSIX) - return std::isnan(number) != 0; -#elif defined(OS_WIN) - return _isnan(number) != 0; -#endif -} - -} // namespace base - -#endif // BASE_FLOAT_UTIL_H_ diff --git a/base/json/json_parser.cc b/base/json/json_parser.cc index d42b1a3..e9a27bc 100644 --- a/base/json/json_parser.cc +++ b/base/json/json_parser.cc @@ -4,7 +4,8 @@ #include "base/json/json_parser.h" -#include "base/float_util.h" +#include <cmath> + #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" @@ -872,7 +873,7 @@ Value* JSONParser::ConsumeNumber() { double num_double; if (base::StringToDouble(num_string.as_string(), &num_double) && - IsFinite(num_double)) { + std::isfinite(num_double)) { return new FundamentalValue(num_double); } diff --git a/base/time/time.cc b/base/time/time.cc index 321323b..bf6c998 100644 --- a/base/time/time.cc +++ b/base/time/time.cc @@ -4,12 +4,12 @@ #include "base/time/time.h" +#include <cmath> #include <ios> #include <limits> #include <ostream> #include <sstream> -#include "base/float_util.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/strings/stringprintf.h" @@ -161,7 +161,7 @@ time_t Time::ToTimeT() const { // static Time Time::FromDoubleT(double dt) { - if (dt == 0 || IsNaN(dt)) + if (dt == 0 || std::isnan(dt)) return Time(); // Preserve 0 so we can tell it doesn't exist. if (dt == std::numeric_limits<double>::infinity()) return Max(); diff --git a/base/trace_event/trace_event_impl.cc b/base/trace_event/trace_event_impl.cc index 12f9598..cbeeeab 100644 --- a/base/trace_event/trace_event_impl.cc +++ b/base/trace_event/trace_event_impl.cc @@ -5,12 +5,12 @@ #include "base/trace_event/trace_event_impl.h" #include <algorithm> +#include <cmath> #include "base/base_switches.h" #include "base/bind.h" #include "base/command_line.h" #include "base/debug/leak_annotations.h" -#include "base/float_util.h" #include "base/format_macros.h" #include "base/json/string_escape.h" #include "base/lazy_instance.h" @@ -647,7 +647,7 @@ void TraceEvent::AppendValueAsJSON(unsigned char type, // should be made into a common method. std::string real; double val = value.as_double; - if (IsFinite(val)) { + if (std::isfinite(val)) { real = DoubleToString(val); // Ensure that the number has a .0 if there's no decimal or 'e'. This // makes sure that when we read the JSON back, it's interpreted as a @@ -665,7 +665,7 @@ void TraceEvent::AppendValueAsJSON(unsigned char type, // "-.1" bad "-0.1" good real.insert(1, "0"); } - } else if (IsNaN(val)){ + } else if (std::isnan(val)){ // The JSON spec doesn't allow NaN and Infinity (since these are // objects in EcmaScript). Use strings instead. real = "\"NaN\""; diff --git a/base/values.cc b/base/values.cc index 52876cf..0e1e2b1 100644 --- a/base/values.cc +++ b/base/values.cc @@ -7,9 +7,9 @@ #include <string.h> #include <algorithm> +#include <cmath> #include <ostream> -#include "base/float_util.h" #include "base/json/json_writer.h" #include "base/logging.h" #include "base/move.h" @@ -175,7 +175,7 @@ FundamentalValue::FundamentalValue(int in_value) FundamentalValue::FundamentalValue(double in_value) : Value(TYPE_DOUBLE), double_value_(in_value) { - if (!IsFinite(double_value_)) { + if (!std::isfinite(double_value_)) { NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) " << "values cannot be represented in JSON"; double_value_ = 0.0; diff --git a/cc/base/histograms.cc b/cc/base/histograms.cc index af1ea66..8b284d9 100644 --- a/cc/base/histograms.cc +++ b/cc/base/histograms.cc @@ -5,9 +5,9 @@ #include "cc/base/histograms.h" #include <algorithm> +#include <cmath> #include <limits> -#include "base/float_util.h" #include "base/numerics/safe_conversions.h" namespace cc { @@ -38,7 +38,7 @@ void ScopedUMAHistogramAreaTimerBase::GetHistogramValues( elapsed = std::max( elapsed, base::TimeDelta::FromMicroseconds(kMinimumTimeMicroseconds)); double area_per_time = area / elapsed.InMillisecondsF(); - DCHECK(!base::IsNaN(area_per_time)); + DCHECK(!std::isnan(area_per_time)); *time_microseconds = base::saturated_cast<Sample>(elapsed.InMicroseconds()); *pixels_per_ms = base::saturated_cast<Sample>(area_per_time); } diff --git a/chrome/browser/speech/tts_controller_impl.cc b/chrome/browser/speech/tts_controller_impl.cc index 8819592..cad1bb3 100644 --- a/chrome/browser/speech/tts_controller_impl.cc +++ b/chrome/browser/speech/tts_controller_impl.cc @@ -7,7 +7,6 @@ #include <string> #include <vector> -#include "base/float_util.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/speech/tts_platform.h" diff --git a/content/browser/android/java/gin_java_method_invocation_helper.cc b/content/browser/android/java/gin_java_method_invocation_helper.cc index ae1c798..93ab2e6 100644 --- a/content/browser/android/java/gin_java_method_invocation_helper.cc +++ b/content/browser/android/java/gin_java_method_invocation_helper.cc @@ -6,10 +6,11 @@ #include <unistd.h> +#include <cmath> + #include "base/android/event_log.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" -#include "base/float_util.h" #include "content/browser/android/java/gin_java_script_to_java_types_coercion.h" #include "content/browser/android/java/java_method.h" #include "content/browser/android/java/jni_helper.h" @@ -256,7 +257,7 @@ void GinJavaMethodInvocationHelper::InvokeMethod(jobject object, float result = object ? env->CallFloatMethodA(object, id, parameters) : env->CallStaticFloatMethodA(clazz, id, parameters); - if (base::IsFinite(result)) { + if (std::isfinite(result)) { result_wrapper.AppendDouble(result); } else { result_wrapper.Append( @@ -268,7 +269,7 @@ void GinJavaMethodInvocationHelper::InvokeMethod(jobject object, double result = object ? env->CallDoubleMethodA(object, id, parameters) : env->CallStaticDoubleMethodA(clazz, id, parameters); - if (base::IsFinite(result)) { + if (std::isfinite(result)) { result_wrapper.AppendDouble(result); } else { result_wrapper.Append( diff --git a/content/browser/renderer_host/input/motion_event_android.cc b/content/browser/renderer_host/input/motion_event_android.cc index 3f18f95..5a437f4 100644 --- a/content/browser/renderer_host/input/motion_event_android.cc +++ b/content/browser/renderer_host/input/motion_event_android.cc @@ -6,8 +6,9 @@ #include <android/input.h> +#include <cmath> + #include "base/android/jni_android.h" -#include "base/float_util.h" #include "jni/MotionEvent_jni.h" #include "ui/events/event_constants.h" @@ -92,7 +93,7 @@ base::TimeTicks FromAndroidTime(int64 time_ms) { } float ToValidFloat(float x) { - if (base::IsNaN(x)) + if (std::isnan(x)) return 0.f; // Wildly large orientation values have been observed in the wild after device diff --git a/content/browser/renderer_host/input/motion_event_android_unittest.cc b/content/browser/renderer_host/input/motion_event_android_unittest.cc index 20b9a52..9a33b31 100644 --- a/content/browser/renderer_host/input/motion_event_android_unittest.cc +++ b/content/browser/renderer_host/input/motion_event_android_unittest.cc @@ -5,7 +5,6 @@ #include <android/input.h> #include "base/android/jni_android.h" -#include "base/float_util.h" #include "content/browser/renderer_host/input/motion_event_android.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/events/event_constants.h" diff --git a/content/child/v8_value_converter_impl.cc b/content/child/v8_value_converter_impl.cc index 6ff8797..9efd429 100644 --- a/content/child/v8_value_converter_impl.cc +++ b/content/child/v8_value_converter_impl.cc @@ -4,11 +4,11 @@ #include "content/child/v8_value_converter_impl.h" +#include <cmath> #include <string> #include "base/bind.h" #include "base/bind_helpers.h" -#include "base/float_util.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" @@ -309,7 +309,7 @@ base::Value* V8ValueConverterImpl::FromV8ValueImpl( if (val->IsNumber()) { double val_as_double = val.As<v8::Number>()->Value(); - if (!base::IsFinite(val_as_double)) + if (!std::isfinite(val_as_double)) return NULL; return new base::FundamentalValue(val_as_double); } diff --git a/content/common/android/gin_java_bridge_value_unittest.cc b/content/common/android/gin_java_bridge_value_unittest.cc index 72a0ea8..0276848 100644 --- a/content/common/android/gin_java_bridge_value_unittest.cc +++ b/content/common/android/gin_java_bridge_value_unittest.cc @@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <cmath> + #include "base/basictypes.h" -#include "base/float_util.h" #include "base/memory/scoped_ptr.h" #include "content/common/android/gin_java_bridge_value.h" #include "testing/gtest/include/gtest/gtest.h" @@ -40,8 +41,7 @@ TEST_F(GinJavaBridgeValueTest, BasicValues) { ASSERT_TRUE(float_infinity_value.get()); EXPECT_TRUE(float_infinity_value->IsType(GinJavaBridgeValue::TYPE_NONFINITE)); EXPECT_TRUE(float_infinity_value->GetAsNonFinite(&native_float)); - EXPECT_FALSE(base::IsFinite(native_float)); - EXPECT_FALSE(base::IsNaN(native_float)); + EXPECT_TRUE(std::isinf(native_float)); EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id)); @@ -57,8 +57,7 @@ TEST_F(GinJavaBridgeValueTest, BasicValues) { EXPECT_TRUE( double_infinity_value->IsType(GinJavaBridgeValue::TYPE_NONFINITE)); EXPECT_TRUE(double_infinity_value->GetAsNonFinite(&native_float)); - EXPECT_FALSE(base::IsFinite(native_float)); - EXPECT_FALSE(base::IsNaN(native_float)); + EXPECT_TRUE(std::isinf(native_float)); EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id)); diff --git a/content/common/page_state_serialization_unittest.cc b/content/common/page_state_serialization_unittest.cc index 6dc775a..38f04f8 100644 --- a/content/common/page_state_serialization_unittest.cc +++ b/content/common/page_state_serialization_unittest.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <math.h> +#include <cmath> #include "base/base64.h" #include "base/files/file_util.h" -#include "base/float_util.h" #include "base/path_service.h" #include "base/pickle.h" #include "base/strings/string_util.h" @@ -47,8 +46,8 @@ void ExpectEquality(const ExplodedHttpBodyElement& a, EXPECT_EQ(a.filesystem_url, b.filesystem_url); EXPECT_EQ(a.file_start, b.file_start); EXPECT_EQ(a.file_length, b.file_length); - if (!(base::IsNaN(a.file_modification_time) && - base::IsNaN(b.file_modification_time))) { + if (!(std::isnan(a.file_modification_time) && + std::isnan(b.file_modification_time))) { EXPECT_DOUBLE_EQ(a.file_modification_time, b.file_modification_time); } EXPECT_EQ(a.blob_uuid, b.blob_uuid); diff --git a/content/renderer/java/gin_java_bridge_value_converter.cc b/content/renderer/java/gin_java_bridge_value_converter.cc index c1727a4..6486082 100644 --- a/content/renderer/java/gin_java_bridge_value_converter.cc +++ b/content/renderer/java/gin_java_bridge_value_converter.cc @@ -4,7 +4,8 @@ #include "content/renderer/java/gin_java_bridge_value_converter.h" -#include "base/float_util.h" +#include <cmath> + #include "base/values.h" #include "content/common/android/gin_java_bridge_value.h" #include "content/renderer/java/gin_java_bridge_object.h" @@ -148,7 +149,7 @@ bool GinJavaBridgeValueConverter::FromV8ArrayBuffer( bool GinJavaBridgeValueConverter::FromV8Number(v8::Handle<v8::Number> value, base::Value** out) const { double double_value = value->Value(); - if (base::IsFinite(double_value)) + if (std::isfinite(double_value)) return false; *out = GinJavaBridgeValue::CreateNonFiniteValue(double_value).release(); return true; diff --git a/content/renderer/java/gin_java_bridge_value_converter_unittest.cc b/content/renderer/java/gin_java_bridge_value_converter_unittest.cc index edffce7..b0ef27a 100644 --- a/content/renderer/java/gin_java_bridge_value_converter_unittest.cc +++ b/content/renderer/java/gin_java_bridge_value_converter_unittest.cc @@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <cmath> + #include "base/basictypes.h" -#include "base/float_util.h" #include "base/memory/scoped_ptr.h" #include "base/strings/stringprintf.h" #include "content/common/android/gin_java_bridge_value.h" @@ -67,8 +68,7 @@ TEST_F(GinJavaBridgeValueConverterTest, BasicValues) { EXPECT_TRUE( infinity_value->IsType(GinJavaBridgeValue::TYPE_NONFINITE)); EXPECT_TRUE(infinity_value->GetAsNonFinite(&native_float)); - EXPECT_FALSE(base::IsFinite(native_float)); - EXPECT_FALSE(base::IsNaN(native_float)); + EXPECT_TRUE(std::isinf(native_float)); } TEST_F(GinJavaBridgeValueConverterTest, ArrayBuffer) { diff --git a/content/renderer/media/media_stream_audio_level_calculator.cc b/content/renderer/media/media_stream_audio_level_calculator.cc index 320b1ab..ad76a43 100644 --- a/content/renderer/media/media_stream_audio_level_calculator.cc +++ b/content/renderer/media/media_stream_audio_level_calculator.cc @@ -4,7 +4,8 @@ #include "content/renderer/media/media_stream_audio_level_calculator.h" -#include "base/float_util.h" +#include <cmath> + #include "base/logging.h" #include "base/stl_util.h" #include "media/base/audio_bus.h" @@ -21,7 +22,7 @@ float MaxAmplitude(const float* audio_data, int length) { if (absolute > max) max = absolute; } - DCHECK(base::IsFinite(max)); + DCHECK(std::isfinite(max)); return max; } diff --git a/dbus/values_util_unittest.cc b/dbus/values_util_unittest.cc index 336d771..a4e560f 100644 --- a/dbus/values_util_unittest.cc +++ b/dbus/values_util_unittest.cc @@ -6,7 +6,6 @@ #include <vector> -#include "base/float_util.h" #include "base/json/json_writer.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 5b97ebc..76be4ff 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -4525,7 +4525,7 @@ class StateSetHandler(TypeHandler): # Make this behavior consistent within Chromium, and avoid leaking GL # errors by generating the error in the command buffer instead of # letting the GL driver generate it. - code.append("base::IsNaN(%s)" % args[ndx].name) + code.append("std::isnan(%s)" % args[ndx].name) if len(code): file.Write(" if (%s) {\n" % " ||\n ".join(code)) file.Write( diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 04a9eb2..861fc4a 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -7,6 +7,7 @@ #include <stdio.h> #include <algorithm> +#include <cmath> #include <list> #include <map> #include <queue> @@ -18,7 +19,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/command_line.h" -#include "base/float_util.h" #include "base/memory/scoped_ptr.h" #include "base/numerics/safe_math.h" #include "base/strings/string_number_conversions.h" diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h index 8930718..62d0391 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h @@ -2314,7 +2314,7 @@ error::Error GLES2DecoderImpl::HandleLineWidth(uint32_t immediate_data_size, *static_cast<const gles2::cmds::LineWidth*>(cmd_data); (void)c; GLfloat width = static_cast<GLfloat>(c.width); - if (width <= 0.0f || base::IsNaN(width)) { + if (width <= 0.0f || std::isnan(width)) { LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "LineWidth", "width out of range"); return error::kNoError; } diff --git a/media/audio/audio_power_monitor.cc b/media/audio/audio_power_monitor.cc index b0b1797..efbad6c 100644 --- a/media/audio/audio_power_monitor.cc +++ b/media/audio/audio_power_monitor.cc @@ -7,7 +7,6 @@ #include <algorithm> #include <cmath> -#include "base/float_util.h" #include "base/logging.h" #include "base/time/time.h" #include "media/base/audio_bus.h" @@ -53,7 +52,7 @@ void AudioPowerMonitor::Scan(const AudioBus& buffer, int num_frames) { const std::pair<float, float> ewma_and_max = vector_math::EWMAAndMaxPower( average_power_, buffer.channel(i), num_frames, sample_weight_); // If data in audio buffer is garbage, ignore its effect on the result. - if (!base::IsFinite(ewma_and_max.first)) { + if (!std::isfinite(ewma_and_max.first)) { sum_power += average_power_; } else { sum_power += ewma_and_max.first; diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index ac67b21..e8eec4c 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc @@ -5,6 +5,7 @@ #include "media/blink/webmediaplayer_impl.h" #include <algorithm> +#include <cmath> #include <limits> #include <string> #include <vector> @@ -14,7 +15,6 @@ #include "base/callback_helpers.h" #include "base/debug/alias.h" #include "base/debug/crash_logging.h" -#include "base/float_util.h" #include "base/message_loop/message_loop_proxy.h" #include "base/metrics/histogram.h" #include "base/single_thread_task_runner.h" @@ -486,7 +486,7 @@ blink::WebTimeRanges WebMediaPlayerImpl::seekable() const { // Allow a special exception for seeks to zero for streaming sources with a // finite duration; this allows looping to work. const bool allow_seek_to_zero = data_source_ && data_source_->IsStreaming() && - base::IsFinite(seekable_end); + std::isfinite(seekable_end); // TODO(dalecurtis): Technically this allows seeking on media which return an // infinite duration so long as DataSource::IsStreaming() is false. While not diff --git a/media/blink/websourcebuffer_impl.cc b/media/blink/websourcebuffer_impl.cc index 3491378..0e38778 100644 --- a/media/blink/websourcebuffer_impl.cc +++ b/media/blink/websourcebuffer_impl.cc @@ -4,19 +4,19 @@ #include "media/blink/websourcebuffer_impl.h" +#include <cmath> #include <limits> #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" -#include "base/float_util.h" #include "media/filters/chunk_demuxer.h" #include "third_party/WebKit/public/platform/WebSourceBufferClient.h" namespace media { static base::TimeDelta DoubleToTimeDelta(double time) { - DCHECK(!base::IsNaN(time)); + DCHECK(!std::isnan(time)); DCHECK_NE(time, -std::numeric_limits<double>::infinity()); if (time == std::numeric_limits<double>::infinity()) diff --git a/ui/events/gesture_detection/scale_gesture_detector.cc b/ui/events/gesture_detection/scale_gesture_detector.cc index 676d6a4..fb27cd9 100644 --- a/ui/events/gesture_detection/scale_gesture_detector.cc +++ b/ui/events/gesture_detection/scale_gesture_detector.cc @@ -5,9 +5,9 @@ #include "ui/events/gesture_detection/scale_gesture_detector.h" #include <limits.h> + #include <cmath> -#include "base/float_util.h" #include "base/logging.h" #include "ui/events/gesture_detection/motion_event.h" #include "ui/events/gesture_detection/scale_gesture_listeners.h" @@ -286,7 +286,7 @@ void ScaleGestureDetector::AddTouchHistory(const MotionEvent& ev) { float total = 0; int sample_count = 0; for (int i = 0; i < count; i++) { - const bool has_last_accepted = !base::IsNaN(touch_history_last_accepted_); + const bool has_last_accepted = !std::isnan(touch_history_last_accepted_); const int history_size = static_cast<int>(ev.GetHistorySize()); const int pointersample_count = history_size + 1; for (int h = 0; h < pointersample_count; h++) { @@ -302,10 +302,10 @@ void ScaleGestureDetector::AddTouchHistory(const MotionEvent& ev) { major = touch_max_major_; total += major; - if (base::IsNaN(touch_upper_) || major > touch_upper_) { + if (std::isnan(touch_upper_) || major > touch_upper_) { touch_upper_ = major; } - if (base::IsNaN(touch_lower_) || major < touch_lower_) { + if (std::isnan(touch_lower_) || major < touch_lower_) { touch_lower_ = major; } diff --git a/ui/gfx/range/range_f.cc b/ui/gfx/range/range_f.cc index 8af832d..46f853d 100644 --- a/ui/gfx/range/range_f.cc +++ b/ui/gfx/range/range_f.cc @@ -7,7 +7,6 @@ #include <algorithm> #include <limits> -#include "base/float_util.h" #include "base/format_macros.h" #include "base/strings/stringprintf.h" |