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

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

Issue 2016223002: Revert of Replace all occurrences of RELEASE_ASSERT in wtf with CHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve conflict in StringImpl.cpp. Created 4 years, 6 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 CHECK_LE(0, index); 168 RELEASE_ASSERT(0 <= index && index < length_);
169 CHECK_LT(index, length_);
170 return start_[index]; 169 return start_[index];
171 } 170 }
172 171
173 T& first() { return start_[0]; } 172 T& first() { return start_[0]; }
174 173
175 T& last() { return start_[length_ - 1]; } 174 T& last() { return start_[length_ - 1]; }
176 175
177 private: 176 private:
178 T* start_; 177 T* start_;
179 int length_; 178 int length_;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 template <class Dest, class Source> 300 template <class Dest, class Source>
302 inline Dest BitCast(Source* source) { 301 inline Dest BitCast(Source* source) {
303 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); 302 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
304 } 303 }
305 304
306 } // namespace double_conversion 305 } // namespace double_conversion
307 306
308 } // namespace WTF 307 } // namespace WTF
309 308
310 #endif // DOUBLE_CONVERSION_UTILS_H_ 309 #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