8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b997cbf commit e091080Copy full SHA for e091080
api/CanMsg.h
@@ -59,14 +59,15 @@ class CanMsg : public Printable
59
60
virtual ~CanMsg() { }
61
62
- void operator = (CanMsg const & other)
+ CanMsg & operator = (CanMsg const & other)
63
63 93CD code>
{
64
- if (this == &other)
65
- return;
66
-
67
- this->id = other.id;
68
- this->data_length = other.data_length;
69
- memcpy(this->data, other.data, this->data_length);
+ if (this != &other)
+ {
+ this->id = other.id;
+ this->data_length = other.data_length;
+ memcpy(this->data, other.data, this->data_length);
+ }
70
+ return (*this);
71
}
72
73
virtual size_t printTo(Print & p) const override
0 commit comments