Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(968)

Unified Diff: third_party/WebKit/Source/wtf/CheckedNumeric.h

Issue 1814563002: wtf/CheckedArithmetic.h delegates to base/numerics/safe_math.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/CheckedNumeric.h
diff --git a/third_party/WebKit/Source/wtf/NotFound.h b/third_party/WebKit/Source/wtf/CheckedNumeric.h
similarity index 83%
copy from third_party/WebKit/Source/wtf/NotFound.h
copy to third_party/WebKit/Source/wtf/CheckedNumeric.h
index 7c7d0c3cfb4c0ba231534d750da4b56161542463..bae31f3537b13e9c3d7705ef5859a150e912572e 100644
--- a/third_party/WebKit/Source/wtf/NotFound.h
+++ b/third_party/WebKit/Source/wtf/CheckedNumeric.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,13 +23,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NotFound_h
-#define NotFound_h
+#ifndef WTF_CheckedNumeric_h
+#define WTF_CheckedNumeric_h
-namespace WTF {
-const size_t kNotFound = static_cast<size_t>(-1);
-}
+/* See base/numerics/safe_math.h for usage.
+ */
+#include "base/numerics/safe_math.h"
-using WTF::kNotFound;
+namespace WTF {
+using base::CheckedNumeric;
+} // namespace WTF
Yuta Kitamura 2016/03/17 08:19:08 We usually add "using WTF::CheckedNumeric" in the
Bret 2016/03/18 20:48:51 Done.
-#endif // NotFound_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698