From f0341ebbf863b6eed3f372dc0cdb4c70023bedcb Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 28 Jun 2024 11:34:32 +0200 Subject: [PATCH] Apply suggested code consistency --- src/FffGcodeWriter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index 481175354c..b1ebefe5a9 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -3937,12 +3937,14 @@ void FffGcodeWriter::setExtruder_addPrime(const SliceDataStorage& storage, Layer void FffGcodeWriter::addPrimeTower(const SliceDataStorage& storage, LayerPlan& gcode_layer, const size_t prev_extruder) const { - if (storage.prime_tower_) + if (! storage.prime_tower_) { - LayerIndex layer_nr = gcode_layer.getLayerNr(); - const std::vector extruder_order = extruder_order_per_layer.get(layer_nr); - storage.prime_tower_->addToGcode(storage, gcode_layer, extruder_order, prev_extruder, gcode_layer.getExtruder()); + return; } + + const LayerIndex layer_nr = gcode_layer.getLayerNr(); + const std::vector extruder_order = extruder_order_per_layer.get(layer_nr); + storage.prime_tower_->addToGcode(storage, gcode_layer, extruder_order, prev_extruder, gcode_layer.getExtruder()); } void FffGcodeWriter::finalize()