[ox/std] Make Vector::contains always noexcept
All checks were successful
Build / build (push) Successful in 2m29s
All checks were successful
Build / build (push) Successful in 2m29s
This commit is contained in:
parent
32e4702dc7
commit
1b629da8fc
6
deps/ox/src/ox/std/vector.hpp
vendored
6
deps/ox/src/ox/std/vector.hpp
vendored
@ -269,7 +269,7 @@ class Vector: detail::VectorAllocator<T, Allocator, SmallVectorSize> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[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(
|
constexpr iterator<T&, T*, false> insert(
|
||||||
std::size_t pos, std::size_t cnt, T val) noexcept(useNoexcept);
|
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>
|
template<typename T, std::size_t SmallVectorSize, typename Allocator>
|
||||||
constexpr bool Vector<T, SmallVectorSize, Allocator>::contains(MaybeView_t<T> const&v) const noexcept(useNoexcept) {
|
constexpr bool Vector<T, SmallVectorSize, Allocator>::contains(MaybeView_t<T> const&v) const noexcept {
|
||||||
for (std::size_t i = 0; i < m_size; i++) {
|
for (std::size_t i = 0; i < m_size; ++i) {
|
||||||
if (m_items[i] == v) {
|
if (m_items[i] == v) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user