From 219cddf40e9e9d697204aa4febfca47700961a36 Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Tue, 21 Jul 2026 11:28:51 +0200 Subject: [PATCH] Fix typo after cleanup --- src/slic3r/GUI/GLTexture.cpp | 6 +++--- src/slic3r/GUI/Plater.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/GLTexture.cpp b/src/slic3r/GUI/GLTexture.cpp index fb230c0405..ab27c81bf7 100644 --- a/src/slic3r/GUI/GLTexture.cpp +++ b/src/slic3r/GUI/GLTexture.cpp @@ -660,8 +660,8 @@ bool GLTexture::generate_texture_from_text(const std::string& text_str, wxFont& found = false; src -= 3; - for (int h = m_height; h > 0; -h) { - for (int w = m_width; w > 0; -w) { + for (int h = m_height; h > 0; --h) { + for (int w = m_width; w > 0; --w) { if ((*src) != background.Red() && !found) { found = true; if (h < font.GetPointSize()) @@ -742,7 +742,7 @@ void GLTexture::render_sub_texture(unsigned int tex_id, float left, float right, static bool to_squared_power_of_two(const std::string& filename, int max_size_px, int& w, int& h) { auto is_power_of_two = [](int v) { return v != 0 && (v & (v - 1)) == 0; }; - auto upper_power_of_two = [](int v) { v-; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }; + auto upper_power_of_two = [](int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; }; int new_w = std::max(w, h); if (!is_power_of_two(new_w)) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index d8a978a835..7efa17b470 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5467,7 +5467,7 @@ struct Plater::priv bool up_to_date(bool saved, bool backup); void suppress_snapshots() { m_prevent_snapshots++; } - void allow_snapshots() { m_prevent_snapshots-; } + void allow_snapshots() { m_prevent_snapshots--; } // BBS: single snapshot void single_snapshots_enter(SingleSnapshot *single) { @@ -17513,7 +17513,7 @@ void Plater::on_filaments_delete(size_t num_filaments, size_t filament_id, int r for (auto& item : item->second.gcodes) { if (item.type == CustomGCode::Type::ToolChange && item.extruder > filament_id) - item.extruder-; + item.extruder--; } } }