Skip to content

Commit bd56da8

Browse files
committed
Fix missing class initialization in constructors.
Modernize deleted copy constructor and copy assignment. Mark cppcheck detected duplicate inherited update() method as fine.
1 parent b1e1191 commit bd56da8

32 files changed

Lines changed: 1154 additions & 648 deletions

src/emc/canterp/canterp.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static char the_command_args[LINELEN] = { 0 }; // just the args part
6767

6868
class Canterp : public InterpBase {
6969
public:
70-
Canterp () : f(0) {}
70+
Canterp () : f(0), filename{} {}
7171
char *error_text(int errcode, char *buf, size_t buflen) override;
7272
char *stack_name(int index, char *buf, size_t buflen) override;
7373
char *line_text(char *buf, size_t buflen) override;

src/emc/nml_intf/canon.hh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,28 @@ typedef struct {
150150
} CanonSpindle_t;
151151

152152
typedef struct CanonConfig_t {
153-
CanonConfig_t() : rotary_unlock_for_traverse(-1) {}
153+
CanonConfig_t()
154+
: xy_rotation(0.0),
155+
rotary_unlock_for_traverse(-1),
156+
g5xOffset{},
157+
g92Offset{},
158+
endPoint{},
159+
lengthUnits(CANON_UNITS_INCHES),
160+
activePlane(CANON_PLANE::XY),
161+
toolOffset{},
162+
motionMode(CANON_EXACT_STOP),
163+
motionTolerance(0.0),
164+
naivecamTolerance(0.0),
165+
feed_mode(0),
166+
spindle_num(0),
167+
spindle{},
168+
linearFeedRate(0.0),
169+
angularFeedRate(0.0),
170+
optional_program_stop(false),
171+
block_delete(false),
172+
cartesian_move(0),
173+
angular_move(0)
174+
{}
154175

155176
double xy_rotation;
156177
int rotary_unlock_for_traverse; // jointnumber or -1

0 commit comments

Comments
 (0)