tests/Font: Avoid lambda capture initialization

Remove the use of this language feature until we raise the requirements to C++14.
This commit is contained in:
Peter Keresztes Schmidt 2021-05-24 00:55:46 +02:00
parent e5cac38521
commit 9900fc1273
1 changed files with 4 additions and 1 deletions

View File

@ -80,8 +80,11 @@ TEST_CASE("FontVariant: GetCodepoint") {
std::vector<uint64> bitmap(FontVariant::kMaxNumCodePoints * height);
// fill bitmap for each codepoint alternating with 1 and std::numeric_limits<uint64>::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;