From 9900fc1273f285bd27c041714b6672feb6ee3943 Mon Sep 17 00:00:00 2001 From: Peter Keresztes Schmidt Date: Mon, 24 May 2021 00:55:46 +0200 Subject: [PATCH] tests/Font: Avoid lambda capture initialization Remove the use of this language feature until we raise the requirements to C++14. --- tests/zm_font.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/zm_font.cpp b/tests/zm_font.cpp index 9ddb79a0e..432f26d7e 100644 --- a/tests/zm_font.cpp +++ b/tests/zm_font.cpp @@ -80,8 +80,11 @@ TEST_CASE("FontVariant: GetCodepoint") { std::vector bitmap(FontVariant::kMaxNumCodePoints * height); // fill bitmap for each codepoint alternating with 1 and std::numeric_limits::max() + // TODO: restore capture initializer when C++14 is supported + int32 n = 0; + bool zero = true; std::generate(bitmap.begin(), bitmap.end(), - [n = 0, zero = true]() mutable { + [n, zero]() mutable { if (n == height) { zero = !zero; n = 0;