mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-16 14:15:59 +08:00
Cleaned up warnings with unused variables and casting to cover signed/unsigned
This commit is contained in:
parent
5b80fa4a55
commit
adc126067d
@ -1216,7 +1216,7 @@ PrintObject::combine_infill()
|
||||
continue;
|
||||
// Check whether the combination of this layer with the lower layers' buffer
|
||||
// would exceed max layer height or max combined layer count.
|
||||
if (current_height + layer->height >= nozzle_diameter + EPSILON || num_layers >= every) {
|
||||
if (current_height + layer->height >= nozzle_diameter + EPSILON || (every < 0 || num_layers >= static_cast<size_t>(every)) ) {
|
||||
// Append combination to lower layer.
|
||||
combine[layer_idx - 1] = num_layers;
|
||||
current_height = 0.;
|
||||
@ -1417,7 +1417,6 @@ PrintObject::discover_horizontal_shells()
|
||||
void
|
||||
PrintObject::_discover_external_horizontal_shells(LayerRegion* layerm, const size_t& i, const size_t& region_id)
|
||||
{
|
||||
auto* print {this->print()};
|
||||
const auto& region_config {layerm->region()->config};
|
||||
for (auto& type : { stTop, stBottom, stBottomBridge }) {
|
||||
// find slices of current type for current layer
|
||||
@ -1456,11 +1455,10 @@ PrintObject::_discover_external_horizontal_shells(LayerRegion* layerm, const siz
|
||||
void
|
||||
PrintObject::_discover_neighbor_horizontal_shells(LayerRegion* layerm, const size_t& i, const size_t& region_id, const SurfaceType& type, Polygons& solid, const size_t& solid_layers)
|
||||
{
|
||||
auto* print {this->print()};
|
||||
const auto& region_config {layerm->region()->config};
|
||||
|
||||
for (int n = (type == stTop ? i-1 : i+1); std::abs(n-int(i)) < solid_layers; (type == stTop ? n-- : n++)) {
|
||||
if (n < 0 || n >= this->layer_count()) continue;
|
||||
if (n < 0 || static_cast<size_t>(n) >= this->layer_count()) continue;
|
||||
|
||||
auto* neighbor_layerm { this->get_layer(n)->regions.at(region_id) };
|
||||
// make a copy so we can use them even after clearing the original collection
|
||||
|
Loading…
x
Reference in New Issue
Block a user