diff --git a/src/nostalgia/core/studio/tilesheetpixelgrid.cpp b/src/nostalgia/core/studio/tilesheetpixelgrid.cpp index 57f9a52c..b5342bfe 100644 --- a/src/nostalgia/core/studio/tilesheetpixelgrid.cpp +++ b/src/nostalgia/core/studio/tilesheetpixelgrid.cpp @@ -64,7 +64,7 @@ void TileSheetGrid::setBufferObject(geo::Point pt1, geo::Point pt2, Color32 c, f void TileSheetGrid::setBufferObjects(const geo::Vec2 &paneSize, const TileSheet::SubSheet &subsheet, glutils::BufferSet *bg) noexcept { const auto pixSize = pixelSize(paneSize); - const auto set = [bg, pixSize](unsigned i, geo::Point pt1, geo::Point pt2, Color32 c) { + const auto set = [&bg, &pixSize](unsigned i, geo::Point pt1, geo::Point pt2, Color32 c) { const auto vbo = &bg->vertices[i * VertexVboLength]; setBufferObject(pt1, pt2, c, vbo, pixSize); }; diff --git a/src/nostalgia/core/studio/tilesheetpixels.cpp b/src/nostalgia/core/studio/tilesheetpixels.cpp index 6a704a87..c49b4d3b 100644 --- a/src/nostalgia/core/studio/tilesheetpixels.cpp +++ b/src/nostalgia/core/studio/tilesheetpixels.cpp @@ -79,7 +79,7 @@ void TileSheetPixels::setPixelBufferObject(const geo::Vec2 &paneSize, unsigned v } void TileSheetPixels::setBufferObjects(const geo::Vec2 &paneSize, const TileSheet &img, const TileSheet::SubSheet &subSheet, const Palette &pal, glutils::BufferSet *bg) noexcept { - const auto setPixel = [this, paneSize, bg, subSheet, pal](std::size_t i, uint8_t p) { + const auto setPixel = [this, &paneSize, &bg, &subSheet, &pal](std::size_t i, uint8_t p) { const auto color = pal.colors[p]; const auto pt = idxToPt(static_cast(i), subSheet.columns); const auto fx = static_cast(pt.x);