Skip to content

Commit f605648

Browse files
committed
helpers: buffer: Add Buffer::Sync::Size() helper
Call into Buffer::Size() for convenience. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent 15e1106 commit f605648

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/helpers/buffer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ const std::array<uint8_t *, 3> &Buffer::Sync::Get() const
6262
return buffer_.get().mem;
6363
}
6464

65+
const std::array<size_t, 3> &Buffer::Sync::Size() const
66+
{
67+
return buffer_.get().Size();
68+
}
69+
6570
Buffer::Buffer()
6671
: size(), mem(), fd({ -1, -1, -1 })
6772
{

src/helpers/buffer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct Buffer::Sync
6363
~Sync();
6464

6565
const std::array<uint8_t *, 3> &Get() const;
66+
const std::array<size_t, 3> &Size() const;
6667

6768
private:
6869
BufferRef buffer_;

0 commit comments

Comments
 (0)