diff --git a/thirdparty/rectpack2d/rectpack2d/best_bin_finder.h b/thirdparty/rectpack2d/rectpack2d/best_bin_finder.h index 8e669d548f..a76b47d1f6 100644 --- a/thirdparty/rectpack2d/rectpack2d/best_bin_finder.h +++ b/thirdparty/rectpack2d/rectpack2d/best_bin_finder.h @@ -167,12 +167,12 @@ namespace rectpack2D { ) { const auto try_pack = [&]( const bin_dimension tried_dimension, - const rect_wh starting_bin + const rect_wh a_starting_bin ) { return best_packing_for_ordering_impl( root, std::forward(ordering), - starting_bin, + a_starting_bin, discard_step, tried_dimension ); @@ -187,9 +187,9 @@ namespace rectpack2D { auto best_bin = std::get(best_result); auto trial = [&](const bin_dimension tried_dimension) { - const auto trial = try_pack(tried_dimension, best_bin); + const auto l_trial = try_pack(tried_dimension, best_bin); - if (const auto better = std::get_if(&trial)) { + if (const auto better = std::get_if(&l_trial)) { best_bin = *better; } }; diff --git a/thirdparty/rectpack2d/rectpack2d/rect_structs.h b/thirdparty/rectpack2d/rectpack2d/rect_structs.h index 8d50696721..dd3629b70e 100644 --- a/thirdparty/rectpack2d/rectpack2d/rect_structs.h +++ b/thirdparty/rectpack2d/rectpack2d/rect_structs.h @@ -6,7 +6,7 @@ namespace rectpack2D { struct rect_wh { rect_wh() : w(0), h(0) {} - rect_wh(const int w, const int h) : w(w), h(h) {} + rect_wh(const int w_, const int h_) : w(w_), h(h_) {} int w; int h; @@ -45,7 +45,7 @@ namespace rectpack2D { int h; rect_xywh() : x(0), y(0), w(0), h(0) {} - rect_xywh(const int x, const int y, const int w, const int h) : x(x), y(y), w(w), h(h) {} + rect_xywh(const int x_, const int y_, const int w_, const int h_) : x(x_), y(y_), w(w_), h(h_) {} int area() const { return w * h; } int perimeter() const { return 2 * w + 2 * h; } @@ -63,7 +63,7 @@ namespace rectpack2D { bool flipped; rect_xywhf() : x(0), y(0), w(0), h(0), flipped(false) {} - rect_xywhf(const int x, const int y, const int w, const int h, const bool flipped) : x(x), y(y), w(flipped ? h : w), h(flipped ? w : h), flipped(flipped) {} + rect_xywhf(const int x_, const int y_, const int w_, const int h_, const bool aFlipped) : x(x_), y(y_), w(aFlipped ? h_ : w_), h(aFlipped ? w_ : h_), flipped(aFlipped) {} rect_xywhf(const rect_xywh& b) : rect_xywhf(b.x, b.y, b.w, b.h, false) {} int area() const { return w * h; }