Add Span conversion to LocalVector.
This commit is contained in:
parent
30bb49ec1f
commit
f5cb739a18
1 changed files with 5 additions and 7 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue