[ox/std] Make Vector::contains always noexcept
All checks were successful
Build / build (push) Successful in 2m29s

This commit is contained in:
Gary Talent 2024-04-24 21:39:02 -05:00
parent 32e4702dc7
commit 1b629da8fc

View File

@ -269,7 +269,7 @@ class Vector: detail::VectorAllocator<T, Allocator, SmallVectorSize> {
}
[[nodiscard]]
constexpr bool contains(MaybeView_t<T> const&) const noexcept(useNoexcept);
constexpr bool contains(MaybeView_t<T> const&) const noexcept;
constexpr iterator<T&, T*, false> insert(
std::size_t pos, std::size_t cnt, T val) noexcept(useNoexcept);
@ -520,8 +520,8 @@ constexpr void Vector<T, SmallVectorSize, Allocator>::resize(std::size_t size) n
}
template<typename T, std::size_t SmallVectorSize, typename Allocator>
constexpr bool Vector<T, SmallVectorSize, Allocator>::contains(MaybeView_t<T> const&v) const noexcept(useNoexcept) {
for (std::size_t i = 0; i < m_size; i++) {
constexpr bool Vector<T, SmallVectorSize, Allocator>::contains(MaybeView_t<T> const&v) const noexcept {
for (std::size_t i = 0; i < m_size; ++i) {
if (m_items[i] == v) {
return true;
}