Skip to content

Commit cb6907b

Browse files
committed
Temporary Fix Because Examples are not updated
1 parent 6984f80 commit cb6907b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/nbl/asset/IBuffer.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ struct NBL_API SBufferBinding
6262
template<typename BufferType>
6363
struct NBL_API SBufferRange
6464
{
65-
SBufferRange(const size_t& _offset, const size_t _size, core::smart_refctd_ptr<BufferType>&& _buffer)
66-
: offset(_offset), size(_size), buffer(core::smart_refctd_ptr<BufferType>(_buffer)) {}
67-
68-
SBufferRange() : offset(0ull), size(0ull), buffer(nullptr) {}
65+
// Temp Fix, If you want to uncomment this then fix every example having compile issues -> add core::smart_refctd_ptr around the buffer to be an r-value ref
66+
// SBufferRange(const size_t& _offset, const size_t& _size, core::smart_refctd_ptr<BufferType>&& _buffer)
67+
// : offset(_offset), size(_size), buffer(core::smart_refctd_ptr<BufferType>(_buffer)) {}
68+
// SBufferRange() : offset(0ull), size(0ull), buffer(nullptr) {}
6969

7070
inline bool isValid() const
7171
{
7272
return buffer && size && (offset+size<=buffer->getSize());
7373
}
7474

75-
size_t offset;
76-
size_t size ;
77-
core::smart_refctd_ptr<BufferType> buffer;
75+
size_t offset = 0ull;
76+
size_t size = 0ull;
77+
core::smart_refctd_ptr<BufferType> buffer = nullptr;
7878

7979
inline bool operator==(const SBufferRange<BufferType>& rhs) const { return buffer==rhs.buffer && offset==rhs.offset && size==rhs.size; }
8080
inline bool operator!=(const SBufferRange<BufferType>& rhs) const { return !operator==(rhs); }

0 commit comments

Comments
 (0)