From f824cccac7311647a8bd22d193d3aac2b961a1dd Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 18 Nov 2019 12:07:36 +0200 Subject: fbs: use std::array and .at() Use std::array and .at() to get bounds checking. Signed-off-by: Tomi Valkeinen --- kms++/src/extframebuffer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kms++/src/extframebuffer.cpp') 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; -- cgit v1.2.3