mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #107486 from Ivorforce/rendering-no-alloc-api
Use raw buffer pointers in `RenderingDevice` allocation APIs to avoid intermediary arrays
This commit is contained in:
commit
ac6252c9c8
10 changed files with 71 additions and 81 deletions
|
|
@ -91,6 +91,11 @@ public:
|
|||
_FORCE_INLINE_ constexpr const T *begin() const { return _ptr; }
|
||||
_FORCE_INLINE_ constexpr const T *end() const { return _ptr + _len; }
|
||||
|
||||
template <typename T1>
|
||||
_FORCE_INLINE_ constexpr Span<T1> reinterpret() const {
|
||||
return Span<T1>(reinterpret_cast<const T1 *>(_ptr), _len * sizeof(T) / sizeof(T1));
|
||||
}
|
||||
|
||||
// Algorithms.
|
||||
constexpr int64_t find(const T &p_val, uint64_t p_from = 0) const;
|
||||
constexpr int64_t rfind(const T &p_val, uint64_t p_from) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue