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

Side by Side Diff: third_party/WebKit/Source/wtf/dtoa/utils.h

Issue 1992873004: Replace all occurrences of RELEASE_ASSERT in wtf with CHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Specialized dchecks in utils.h. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int length() const { return length_; } 158 int length() const { return length_; }
159 159
160 // Returns whether or not the vector is empty. 160 // Returns whether or not the vector is empty.
161 bool is_empty() const { return length_ == 0; } 161 bool is_empty() const { return length_ == 0; }
162 162
163 // Returns the pointer to the start of the data in the vector. 163 // Returns the pointer to the start of the data in the vector.
164 T* start() const { return start_; } 164 T* start() const { return start_; }
165 165
166 // Access individual vector elements. 166 // Access individual vector elements.
167 T& operator[](int index) const { 167 T& operator[](int index) const {
168 RELEASE_ASSERT(0 <= index && index < length_); 168 CHECK_LE(0, index);
danakj 2016/06/01 18:20:11 It's a long shot but this isn't just a replacement
kotenkov 2016/06/01 18:22:39 Hmm, I'll run perf try jobs later today.
169 CHECK_LT(index, length_);
169 return start_[index]; 170 return start_[index];
170 } 171 }
171 172
172 T& first() { return start_[0]; } 173 T& first() { return start_[0]; }
173 174
174 T& last() { return start_[length_ - 1]; } 175 T& last() { return start_[length_ - 1]; }
175 176
176 private: 177 private:
177 T* start_; 178 T* start_;
178 int length_; 179 int length_;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 template <class Dest, class Source> 301 template <class Dest, class Source>
301 inline Dest BitCast(Source* source) { 302 inline Dest BitCast(Source* source) {
302 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); 303 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
303 } 304 }
304 305
305 } // namespace double_conversion 306 } // namespace double_conversion
306 307
307 } // namespace WTF 308 } // namespace WTF
308 309
309 #endif // DOUBLE_CONVERSION_UTILS_H_ 310 #endif // DOUBLE_CONVERSION_UTILS_H_
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/allocator/Partitions.cpp ('k') | third_party/WebKit/Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698