HomeAleph Objects Inc

Always use get<ExtruderTrain&>(...).extruder_nr instead of get<size_t>(...)

Authored by Ghostkeeper on Sep 13 2018, 1:16 AM.

Description

Always use get<ExtruderTrain&>(...).extruder_nr instead of get<size_t>(...)

This way you have a single source of truth: The pre-processed extruder number in the ExtruderTrain field. This extruder number will never cause a segfault if the front-end passes an extruder number that is too high, but gives a proper error instead then. (It'll still give a segfault if the implementation creates an array that is too short though.)

Contributes to issue CURA-4410.

Details

Committed
GhostkeeperSep 13 2018, 1:16 AM
Pushed
victor_larchenkoDec 4 2018, 4:17 AM
Parents
rCTE4342531b13c9: Remove unused getAllSettingsString
Branches
Unknown
Tags
Unknown