summaryrefslogtreecommitdiff
path: root/AK/UUID.cpp
AgeCommit message (Collapse)Author
2022-11-06Everywhere: Remove redundant inequality comparison operatorsDaniel Bertalan
C++20 can automatically synthesize `operator!=` from `operator==`, so there is no point in writing such functions by hand if all they do is call through to `operator==`. This fixes a compile error with compilers that implement P2468 (Clang 16 currently). This paper restores the C++17 behavior that if both `T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators makes the rewriting possible again. See https://reviews.llvm.org/D134529#3853062
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-02-16AK: Return KString instead of String from encode_hex in the KernelIdan Horowitz
This let's us propagate allocation errors from this API.
2022-02-16AK+Kernel: Return KString from UUID::to_string() in the KernelIdan Horowitz
This lets us safely handle allocation failure.
2022-01-29AK+Kernel: Implement UUID mixed endianness supportLiav A
This is being used by GUID partitions so the first three dash-delimited fields of the GUID are stored in little endian order but the last two fields are stored in big endian order, hence it's a representation which is mixed.
2022-01-24AK+Userland: Make AK::decode_hex() return ErrorOrSam Atkins
This lets us propagate the reason why it failed up to the caller. :^)
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-09-16AK: Use default constructor/destructor instead of declaring an empty oneBrian Gianforcaro
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
2021-08-03Everywhere: Make use of container version of all_ofLenny Maiorani
Problem: - New `all_of` implementation takes the entire container so the user does not need to pass explicit begin/end iterators. This is unused except is in tests. Solution: - Make use of the new and more user-friendly version where possible.
2021-05-16AK+Userland: Fix some compiler warnings and make variables const-refGunnar Beutner
This fixes a few compiler warnings and makes some variables const-ref in preparation for the next commit which changes how ByteBuffer works.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...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-01-01AK: Add the UUID containerLiav A
This container represents a universally unique identifier. This will be used later in the kernel for GUID partitions.