util/{Const,Writable}Buffer: add constructor with two pointers
This commit is contained in:
parent
65059f2add
commit
0066f7a818
|
@ -109,6 +109,9 @@ struct ConstBuffer {
|
|||
constexpr ConstBuffer(pointer_type _data, size_type _size)
|
||||
:data(_data), size(_size) {}
|
||||
|
||||
constexpr ConstBuffer(pointer_type _data, pointer_type _end)
|
||||
:data(_data), size(_end - _data) {}
|
||||
|
||||
/**
|
||||
* Convert array to ConstBuffer instance.
|
||||
*/
|
||||
|
|
|
@ -103,6 +103,9 @@ struct WritableBuffer {
|
|||
constexpr WritableBuffer(pointer_type _data, size_type _size)
|
||||
:data(_data), size(_size) {}
|
||||
|
||||
constexpr WritableBuffer(pointer_type _data, pointer_type _end)
|
||||
:data(_data), size(_end - _data) {}
|
||||
|
||||
/**
|
||||
* Convert array to WritableBuffer instance.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue