Title: [278384] trunk/Source/WTF
Revision
278384
Author
cdu...@apple.com
Date
2021-06-02 16:49:05 -0700 (Wed, 02 Jun 2021)

Log Message

Drop WTF::Vector overloads taking index as Checked<size_t>
https://bugs.webkit.org/show_bug.cgi?id=226553

Reviewed by Geoffrey Garen.

Drop WTF::Vector overloads taking index as Checked<size_t>. They are no longer needed now that
Checked<size_t> can implicitly get converted to size_t (r278338).

* wtf/Vector.h:
(WTF::Vector::at const):
(WTF::Vector::operator[] const):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (278383 => 278384)


--- trunk/Source/WTF/ChangeLog	2021-06-02 23:33:20 UTC (rev 278383)
+++ trunk/Source/WTF/ChangeLog	2021-06-02 23:49:05 UTC (rev 278384)
@@ -1,5 +1,19 @@
 2021-06-02  Chris Dumez  <cdu...@apple.com>
 
+        Drop WTF::Vector overloads taking index as Checked<size_t>
+        https://bugs.webkit.org/show_bug.cgi?id=226553
+
+        Reviewed by Geoffrey Garen.
+
+        Drop WTF::Vector overloads taking index as Checked<size_t>. They are no longer needed now that
+        Checked<size_t> can implicitly get converted to size_t (r278338).
+
+        * wtf/Vector.h:
+        (WTF::Vector::at const):
+        (WTF::Vector::operator[] const):
+
+2021-06-02  Chris Dumez  <cdu...@apple.com>
+
         Drop Checked::safeGet()
         https://bugs.webkit.org/show_bug.cgi?id=226537
 

Modified: trunk/Source/WTF/wtf/Vector.h (278383 => 278384)


--- trunk/Source/WTF/wtf/Vector.h	2021-06-02 23:33:20 UTC (rev 278383)
+++ trunk/Source/WTF/wtf/Vector.h	2021-06-02 23:49:05 UTC (rev 278384)
@@ -717,21 +717,9 @@
             OverflowHandler::overflowed();
         return Base::buffer()[i];
     }
-    T& at(Checked<size_t> i)
-    {
-        RELEASE_ASSERT(i < size());
-        return Base::buffer()[i];
-    }
-    const T& at(Checked<size_t> i) const
-    {
-        RELEASE_ASSERT(i < size());
-        return Base::buffer()[i];
-    }
 
     T& operator[](size_t i) { return at(i); }
     const T& operator[](size_t i) const { return at(i); }
-    T& operator[](Checked<size_t> i) { return at(i); }
-    const T& operator[](Checked<size_t> i) const { return at(i); }
 
     T* data() { return Base::buffer(); }
     const T* data() const { return Base::buffer(); }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to