From 2da3d80a62e092495ccff543e93e399576e11204 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Thu, 6 Jan 2022 17:35:21 +0100 Subject: [PATCH] Fixing compilation on non-MSVC. --- src/libslic3r/GCode/FindReplace.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/GCode/FindReplace.cpp b/src/libslic3r/GCode/FindReplace.cpp index bb81876d8..d349632b5 100644 --- a/src/libslic3r/GCode/FindReplace.cpp +++ b/src/libslic3r/GCode/FindReplace.cpp @@ -108,9 +108,9 @@ std::string GCodeFindReplace::process_layer(const std::string &ain) find_and_replace_whole_word(out, substitution.plain_pattern, substitution.format, [](const std::string &str, size_t start_pos, const std::string &match) { auto begin = str.begin() + start_pos; - auto res = boost::ifind_first( - boost::iterator_range(begin, str.end()), - boost::iterator_range(match.begin(), match.end())); + boost::iterator_range r1(begin, str.end()); + boost::iterator_range r2(match.begin(), match.end()); + auto res = boost::ifind_first(r1, r2); return res ? std::make_pair(size_t(res.begin() - begin), size_t(res.end() - begin)) : std::make_pair(std::string::npos, std::string::npos); }); else