mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Add Span conversion to LocalVector.
This commit is contained in:
@@ -48,13 +48,12 @@ private:
|
||||
T *data = nullptr;
|
||||
|
||||
public:
|
||||
T *ptr() {
|
||||
return data;
|
||||
}
|
||||
_FORCE_INLINE_ T *ptr() { return data; }
|
||||
_FORCE_INLINE_ const T *ptr() const { return data; }
|
||||
_FORCE_INLINE_ U size() const { return count; }
|
||||
|
||||
const T *ptr() const {
|
||||
return data;
|
||||
}
|
||||
_FORCE_INLINE_ Span<T> span() const { return Span(data, count); }
|
||||
_FORCE_INLINE_ operator Span<T>() const { return span(); }
|
||||
|
||||
// Must take a copy instead of a reference (see GH-31736).
|
||||
_FORCE_INLINE_ void push_back(T p_elem) {
|
||||
@@ -146,7 +145,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ U size() const { return count; }
|
||||
void resize(U p_size) {
|
||||
if (p_size < count) {
|
||||
if constexpr (!std::is_trivially_destructible_v<T> && !force_trivial) {
|
||||
|
||||
Reference in New Issue
Block a user