Chromium Code Reviews| 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 |