From 3b19f8b268f606fbd0ea10dbf407d4a9f6140f0e Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 23 Mar 2022 13:04:04 +0100 Subject: [PATCH] Turns out vector::data() can return null --- src/Collections/List.hpp | 2 +- src/Memory/__OptionalUniquePtrList.hpp | 2 +- src/Memory/__UniquePtrList.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Collections/List.hpp b/src/Collections/List.hpp index fba4d5c..ae73a91 100644 --- a/src/Collections/List.hpp +++ b/src/Collections/List.hpp @@ -150,7 +150,7 @@ namespace ArbUt { /// @brief Return a raw pointer to the beginning of the list. /// @return A raw array pointer to the beginning of the list. - const ValueT* non_null RawData() const noexcept { return _vector.data(); } + const ValueT* nullable RawData() const noexcept { return _vector.data(); } /// @brief Returns a std::vector representation of the current list. /// @return A std::vector representation of the current list. diff --git a/src/Memory/__OptionalUniquePtrList.hpp b/src/Memory/__OptionalUniquePtrList.hpp index fd9e69e..278b06f 100644 --- a/src/Memory/__OptionalUniquePtrList.hpp +++ b/src/Memory/__OptionalUniquePtrList.hpp @@ -141,7 +141,7 @@ namespace ArbUt { /// @brief Return a raw pointer to the beginning of the list. /// @return A raw array pointer to the beginning of the list. - ValueT* nullable const* non_null RawData() const noexcept { return _vector.data(); } + ValueT* nullable const* nullable RawData() const noexcept { return _vector.data(); } /// @brief Returns a std::vector representation of the current list. /// @return A std::vector representation of the current list. diff --git a/src/Memory/__UniquePtrList.hpp b/src/Memory/__UniquePtrList.hpp index 8febba3..4b9beca 100644 --- a/src/Memory/__UniquePtrList.hpp +++ b/src/Memory/__UniquePtrList.hpp @@ -147,7 +147,7 @@ namespace ArbUt { /// @brief Return a raw pointer to the beginning of the list. /// @return A raw array pointer to the beginning of the list. - ValueT* non_null const* non_null RawData() const noexcept { return _vector.data(); } + ValueT* non_null const* nullable RawData() const noexcept { return _vector.data(); } /// @brief Returns a std::vector representation of the current list. /// @return A std::vector representation of the current list.