Title: [288993] trunk/Source/WTF
Revision
288993
Author
[email protected]
Date
2022-02-02 13:38:02 -0800 (Wed, 02 Feb 2022)

Log Message

[JSC] Remove compiler warning in TrailingArray.h
https://bugs.webkit.org/show_bug.cgi?id=236014

Patch by Xan Lopez <[email protected]> on 2022-02-02
Reviewed by Yusuke Suzuki.

* wtf/TrailingArray.h:
(WTF::TrailingArray::TrailingArray): cast the std::distance result
to size_t, we want to compare the absolute value of the distance
with the 'unsigned int' size.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (288992 => 288993)


--- trunk/Source/WTF/ChangeLog	2022-02-02 21:10:32 UTC (rev 288992)
+++ trunk/Source/WTF/ChangeLog	2022-02-02 21:38:02 UTC (rev 288993)
@@ -1,3 +1,15 @@
+2022-02-02  Xan Lopez  <[email protected]>
+
+        [JSC] Remove compiler warning in TrailingArray.h
+        https://bugs.webkit.org/show_bug.cgi?id=236014
+
+        Reviewed by Yusuke Suzuki.
+
+        * wtf/TrailingArray.h:
+        (WTF::TrailingArray::TrailingArray): cast the std::distance result
+        to size_t, we want to compare the absolute value of the distance
+        with the 'unsigned int' size.
+
 2022-02-02  Rob Buis  <[email protected]>
 
         Enable overflow:clip feature

Modified: trunk/Source/WTF/wtf/TrailingArray.h (288992 => 288993)


--- trunk/Source/WTF/wtf/TrailingArray.h	2022-02-02 21:10:32 UTC (rev 288992)
+++ trunk/Source/WTF/wtf/TrailingArray.h	2022-02-02 21:38:02 UTC (rev 288993)
@@ -66,7 +66,7 @@
         : m_size(size)
     {
         static_assert(std::is_final_v<Derived>);
-        ASSERT(std::distance(first, last) == size);
+        ASSERT(static_cast<size_t>(std::distance(first, last)) == size);
         std::uninitialized_copy(first, last, begin());
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to