Skip to content

Commit

Permalink
Fix an "implicitly-declared copy assignment operator" warning
Browse files Browse the repository at this point in the history
Discovered with -Wextra (-Wdeprecated-copy).
  • Loading branch information
ssilverman committed Mar 17, 2023
1 parent b29295b commit 53507bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions teensy3/DMAChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ class DMASetting : public DMABaseClass {
TCD = &tcddata;
*this = c;
}
DMASetting & operator = (const DMASetting &rhs) {
copy_tcd(TCD, rhs.TCD);
return *this;
}
DMASetting & operator = (const DMABaseClass &rhs) {
copy_tcd(TCD, rhs.TCD);
return *this;
Expand Down
4 changes: 4 additions & 0 deletions teensy4/DMAChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ class DMASetting : public DMABaseClass {
TCD = &tcddata;
*this = c;
}
DMASetting & operator = (const DMASetting &rhs) {
copy_tcd(TCD, rhs.TCD);
return *this;
}
DMASetting & operator = (const DMABaseClass &rhs) {
copy_tcd(TCD, rhs.TCD);
return *this;
Expand Down

0 comments on commit 53507bf

Please sign in to comment.