Ticket #14 (closed bug: fixed)
QgsGeometryVertexIndex::operator= must return a value
Description
Small bug in file qgsgeometryvertexindex.cpp (revision 4502), lines 31-34: QgsGeometryVertexIndex::operator= must return a value.
Current incomplete version:
QgsGeometryVertexIndex&
QgsGeometryVertexIndex::operator=(QgsGeometryVertexIndex const& rhs)
{
mIndex = rhs.mIndex;
}
Possible min. required fix:
QgsGeometryVertexIndex&
QgsGeometryVertexIndex::operator=(QgsGeometryVertexIndex const& rhs)
{
mIndex = rhs.mIndex;
return *this
}
But I'm not sure what copy semantic is expected here. What about self-copying? Usually, self-copying is forbidden, then
QgsGeometryVertexIndex&
QgsGeometryVertexIndex::operator=(QgsGeometryVertexIndex
const& rhs)
{
if (&rhs != this)
{
mIndex = rhs.mIndex;
}
return *this
}
Change History
Note: See
TracTickets for help on using
tickets.