From 6e7f2a54012425d8162d2b983c6e537ae756ebf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 18 Feb 2022 18:35:05 +0100 Subject: [PATCH] GL: don't use std::fill_n(). This used to somehow get dragged along with on all platforms we tested on, but once we get rid of we'd have to include instead. Not acceptable, also it's much shorter and less error-prone this way. --- src/Magnum/GL/Implementation/BufferState.cpp | 3 +-- src/Magnum/GL/Implementation/TextureState.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/Implementation/BufferState.cpp b/src/Magnum/GL/Implementation/BufferState.cpp index 1292fe40e..f71a53769 100644 --- a/src/Magnum/GL/Implementation/BufferState.cpp +++ b/src/Magnum/GL/Implementation/BufferState.cpp @@ -209,8 +209,7 @@ BufferState::BufferState(Context& context, Containers::StaticArrayView{{}, State::DisengagedBinding}); + for(std::pair& i: bindings) + i = {{}, State::DisengagedBinding}; #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) - std::fill_n(imageBindings.begin(), imageBindings.size(), std::tuple{State::DisengagedBinding, 0, false, 0, 0}); + for(std::tuple& i: imageBindings) + i = {State::DisengagedBinding, 0, false, 0, 0}; #endif }