OLD | NEW |
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 /* Provides checked integers, detecting integer overflow and divide-by-0. */ | 6 /* Provides checked integers, detecting integer overflow and divide-by-0. */ |
7 | 7 |
8 // Necessary modifications are made to the original CheckedInt.h file when | 8 // Necessary modifications are made to the original CheckedInt.h file when |
9 // incorporating it into WebKit: | 9 // incorporating it into WebKit: |
10 // 1) Comment out #define MOZ_CHECKEDINT_ENABLE_MOZ_ASSERTS | 10 // 1) Comment out #define MOZ_CHECKEDINT_ENABLE_MOZ_ASSERTS |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 template<> | 125 template<> |
126 struct IsSupportedPass2<unsigned short> | 126 struct IsSupportedPass2<unsigned short> |
127 { static const bool value = true; }; | 127 { static const bool value = true; }; |
128 | 128 |
129 template<> | 129 template<> |
130 struct IsSupportedPass2<int> | 130 struct IsSupportedPass2<int> |
131 { static const bool value = true; }; | 131 { static const bool value = true; }; |
132 | 132 |
133 template<> | 133 template<> |
134 struct IsSupportedPass2<unsigned int> | 134 struct IsSupportedPass2<unsigned> |
135 { static const bool value = true; }; | 135 { static const bool value = true; }; |
136 | 136 |
137 template<> | 137 template<> |
138 struct IsSupportedPass2<long> | 138 struct IsSupportedPass2<long> |
139 { static const bool value = true; }; | 139 { static const bool value = true; }; |
140 | 140 |
141 template<> | 141 template<> |
142 struct IsSupportedPass2<unsigned long> | 142 struct IsSupportedPass2<unsigned long> |
143 { static const bool value = true; }; | 143 { static const bool value = true; }; |
144 | 144 |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 typedef CheckedInt<int16_t> CheckedInt16; | 810 typedef CheckedInt<int16_t> CheckedInt16; |
811 typedef CheckedInt<uint16_t> CheckedUint16; | 811 typedef CheckedInt<uint16_t> CheckedUint16; |
812 typedef CheckedInt<int32_t> CheckedInt32; | 812 typedef CheckedInt<int32_t> CheckedInt32; |
813 typedef CheckedInt<uint32_t> CheckedUint32; | 813 typedef CheckedInt<uint32_t> CheckedUint32; |
814 typedef CheckedInt<int64_t> CheckedInt64; | 814 typedef CheckedInt<int64_t> CheckedInt64; |
815 typedef CheckedInt<uint64_t> CheckedUint64; | 815 typedef CheckedInt<uint64_t> CheckedUint64; |
816 | 816 |
817 } // namespace WebCore | 817 } // namespace WebCore |
818 | 818 |
819 #endif /* mozilla_CheckedInt_h_ */ | 819 #endif /* mozilla_CheckedInt_h_ */ |
OLD | NEW |