kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24764
Copy & operator=
-
To:
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Sumiński <maciej.suminski@xxxxxxx>
-
Date:
Wed, 25 May 2016 16:03:15 +0200
-
Authentication-results:
spf=pass (sender IP is 188.184.36.48) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0
I am trying to understand the meaning of Copy() method defined for some
of BOARD_ITEMs. I would like to replace the method with operator= to
make the code clearer, and then give it consistent behavior. I have
noticed that Copy() implementations differ in:
- clearing Pback/Pnext fields
- setting a new timestamp
- copying pointer to parent object
I guess we should not change parent & DLIST related fields, as they are
expected to be already set to valid values (might be NULL for standalone
objects, but it is still OK). I suspect timestamp has to be set to a new
value to distinguish the objects.
Regards,
Orson
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups