Skip to content

Commit

Permalink
Put variable definition before use.
Browse files Browse the repository at this point in the history
Though it's technically possible to do it the other way around because of the constexpr, it doesn't make much 'aestetic' sense.

done as part of CURA-12017
  • Loading branch information
rburema committed Jul 10, 2024
1 parent 5fe8c2c commit 9b610fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/GCodePathConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace cura
*/
struct GCodePathConfig
{
static constexpr double FAN_SPEED_DEFAULT = -1.0;

coord_t z_offset{}; //<! vertical offset from 'full' layer height
PrintFeatureType type{}; //!< name of the feature type
coord_t line_width{}; //!< width of the line extruded
Expand All @@ -27,7 +29,6 @@ struct GCodePathConfig
bool is_bridge_path{ false }; //!< whether current config is used when bridging
double fan_speed{ FAN_SPEED_DEFAULT }; //!< fan speed override for this path, value should be within range 0-100 (inclusive) and ignored otherwise
double extrusion_mm3_per_mm{ calculateExtrusion() }; //!< current mm^3 filament moved per mm line traversed
static constexpr double FAN_SPEED_DEFAULT = -1;

[[nodiscard]] constexpr bool operator==(const GCodePathConfig& other) const noexcept = default;
[[nodiscard]] constexpr auto operator<=>(const GCodePathConfig& other) const = default;
Expand Down

0 comments on commit 9b610fe

Please sign in to comment.