Skip to content

Commit 5ba5010

Browse files
committed
Don't use construtor delegation
1 parent 21eb965 commit 5ba5010

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

api/CanMsg.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ class CanMsg : public Printable
5151

5252
CanMsg() : CanMsg(0, 0, nullptr) { }
5353

54-
CanMsg(CanMsg const & other) : CanMsg(other.id, other.data_length, other.data) {
54+
CanMsg(CanMsg const & other) {
55+
id = other.id;
56+
data_length = other.data_length;
57+
if (data_length > 0)
58+
memcpy(data, other.data, data_length);
5559
}
5660

5761
virtual ~CanMsg() { }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy