lordtangent / arsenalsuite

Automatically exported from code.google.com/p/arsenalsuite
GNU General Public License v2.0
0 stars 0 forks source link

RecordList::operator= has incorrect semantics #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The method:
RecordList & RecordList::operator=( const RecordList & other );
has incorrect semantics. 

It currently clears the contents of this before copying content.

It should first of all check to see if this==other. It is perfectly valid
to assign instance A to A without losing its content.

Original issue reported on code.google.com by tal...@gmail.com on 6 Nov 2009 at 5:50

GoogleCodeExporter commented 8 years ago
Committed a possible fix for this.

Original comment by barry.ro...@gmail.com on 26 Nov 2009 at 4:16

GoogleCodeExporter commented 8 years ago

Original comment by barry.ro...@gmail.com on 22 Feb 2010 at 2:36