diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-11-18 12:07:36 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2019-11-18 12:12:39 +0200 |
commit | f824cccac7311647a8bd22d193d3aac2b961a1dd (patch) | |
tree | 3fd742c256fe0acd92d4a21b0e06944fb2256e14 /kms++/src/extframebuffer.cpp | |
parent | 7a52c7d720398da7df242aeef7be652b54290e94 (diff) |
fbs: use std::array and .at()
Use std::array and .at() to get bounds checking.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++/src/extframebuffer.cpp')
-rw-r--r-- | kms++/src/extframebuffer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kms++/src/extframebuffer.cpp b/kms++/src/extframebuffer.cpp index 9f7ab6c..23aed50 100644 --- a/kms++/src/extframebuffer.cpp +++ b/kms++/src/extframebuffer.cpp @@ -28,10 +28,9 @@ ExtFramebuffer::ExtFramebuffer(Card& card, uint32_t width, uint32_t height, Pixe throw std::invalid_argument("the size of handles, pitches and offsets has to match number of planes"); for (int i = 0; i < format_info.num_planes; ++i) { - FramebufferPlane& plane = m_planes[i]; + FramebufferPlane& plane = m_planes.at(i); plane.handle = handles[i]; - plane.stride = pitches[i]; plane.offset = offsets[i]; plane.size = plane.stride * height; |