From fc312fbb31a0aeb2d6bff1623dee0b9c8c2c62b1 Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Wed, 23 Sep 2026 14:51:07 +0200 Subject: [PATCH] Fix the Windows build: near and far are macros there bridge_over_infill's helper for splitting polygons by proximity named its locals near and far. The Windows headers define both as macros that expand to nothing, so "Polygons near;" declared nothing and the uses of it did not compile. Renamed; no behaviour change. --- src/libslic3r/PrintObject.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index f29881d8e4..d26bb142cb 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -3533,11 +3533,13 @@ void PrintObject::bridge_over_infill() // expansion_area is a clean, non-overlapping set, so uniting it with a bridge or cutting a bridge // out of it only changes the polygons near that bridge. The rest are passed through untouched // instead of being fed to ClipperLib with the whole layer again for every candidate. - const auto split_near = [](const Polygons &polys, const BoundingBox &bbox, Polygons &far) { - Polygons near; + // Not `near`/`far`: the Windows headers still define those as macros, and they expand to + // nothing, which turns the declaration below into an empty one. + const auto split_near = [](const Polygons &polys, const BoundingBox &bbox, Polygons &rest) { + Polygons nearby; for (const Polygon &p : polys) - (get_extents(p).overlap(bbox) ? near : far).emplace_back(p); - return near; + (get_extents(p).overlap(bbox) ? nearby : rest).emplace_back(p); + return nearby; }; for (const CandidateSurface &candidate : surfaces_by_layer[lidx]) { const auto ®ion_config = candidate.region->region().config();