Fixed build on MacOS.

Based on information in https://stackoverflow.com/a/46115028, structured bindings in C++17 don't name variables, and because of that, it is impossible to capture these variables in lambda functions.
This commit is contained in:
Lukáš Hejl 2021-06-13 16:22:44 +02:00
parent e17b57d6bd
commit bfd83f925d

View File

@ -703,7 +703,7 @@ void TriangleSelector::deserialize(const std::pair<std::vector<std::pair<int, in
for (auto [triangle_id, ibit] : data.first) {
assert(triangle_id < int(m_triangles.size()));
assert(ibit < data.second.size());
auto next_nibble = [&data, &ibit]() {
auto next_nibble = [&data, &ibit = ibit]() {
int n = 0;
for (int i = 0; i < 4; ++ i)
n |= data.second[ibit ++] << i;