Commit graph

13 commits

Author SHA1 Message Date
Andreas Kling
8ea029405f AK: Sprinkle [[nodiscard]] on AK::Array 2021-07-21 18:22:10 +02:00
Andreas Kling
4b0498e38b AK: Convert Array to east-const style 2021-07-21 18:21:15 +02:00
Ali Mohammad Pur
ab03c6fadf AK: Export integer_sequence_generate_array() 2021-05-05 19:02:51 +02:00
Ali Mohammad Pur
b361793ad8 AK: Add min() and max() methods to Array<T, N>
...That are only defined when min() and max() are defined on the
elements.
2021-05-05 19:02:51 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Hendiadyoin1
f673f08bec AK: Fix integer_sequence_generate_array
It was for some reason Architecture dependent.
Now we use size_t instead of unsinged long
2021-03-21 09:35:23 +01:00
Andreas Kling
69d8ad52c4 AK: Always do bounds checking in Array::operator[] 2021-02-27 09:23:32 +01:00
Andreas Kling
5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)

Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.

We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Brian Gianforcaro
df73a86875 AK: Add an implementation of Array<T, Size>::fill(...) 2021-02-21 12:54:39 +01:00
AnotherTest
f0d85acc94 AK: Add an iota_array() function that can generate an array
...of increasing values with an optional offset.
2021-02-08 18:08:55 +01:00
asynts
3aaece8733 AK: Remove redundant compare() functions. 2021-01-02 01:37:22 +01:00
asynts
b5ca74e78a AK: Add template deduction guides for Array. 2020-09-21 20:17:36 +02:00
asynts
76e37e8c96 AK: Add Array<T, Size> template. 2020-09-08 14:01:21 +02:00