Skip to content

Commit

Permalink
Fix missing class initialization in constructors.
Browse files Browse the repository at this point in the history
Modernize deleted copy constructor and copy assignment.
Mark cppcheck detected duplicate inherited update() method as fine.
  • Loading branch information
BsAtHome committed Feb 7, 2025
1 parent b1e1191 commit bd56da8
Show file tree
Hide file tree
Showing 32 changed files with 1,154 additions and 648 deletions.
2 changes: 1 addition & 1 deletion src/emc/canterp/canterp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static char the_command_args[LINELEN] = { 0 }; // just the args part

class Canterp : public InterpBase {
public:
Canterp () : f(0) {}
Canterp () : f(0), filename{} {}
char *error_text(int errcode, char *buf, size_t buflen) override;
char *stack_name(int index, char *buf, size_t buflen) override;
char *line_text(char *buf, size_t buflen) override;
Expand Down
23 changes: 22 additions & 1 deletion src/emc/nml_intf/canon.hh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,28 @@ typedef struct {
} CanonSpindle_t;

typedef struct CanonConfig_t {
CanonConfig_t() : rotary_unlock_for_traverse(-1) {}
CanonConfig_t()
: xy_rotation(0.0),
rotary_unlock_for_traverse(-1),
g5xOffset{},
g92Offset{},
endPoint{},
lengthUnits(CANON_UNITS_INCHES),
activePlane(CANON_PLANE::XY),
toolOffset{},
motionMode(CANON_EXACT_STOP),
motionTolerance(0.0),
naivecamTolerance(0.0),
feed_mode(0),
spindle_num(0),
spindle{},
linearFeedRate(0.0),
angularFeedRate(0.0),
optional_program_stop(false),
block_delete(false),
cartesian_move(0),
angular_move(0)
{}

double xy_rotation;
int rotary_unlock_for_traverse; // jointnumber or -1
Expand Down
Loading

0 comments on commit bd56da8

Please sign in to comment.