Hi,
my method has the following code:
const QVector<unsigned int> CLandTypes::getLandTypes()
{
QVector<unsigned int> returnValue;
for(QMap<unsigned int, CLandType>::iterator mapLandTypeIterator = (QMap<unsigned int, CLandType>::iterator)d->LandTypes.begin(); mapLandTypeIterator != (QMap<unsigned int, CLandType>::iterator)d->LandTypes.end();++mapLandTypeIterator)
{
returnValue.push_back(mapLandTypeIterator.key());
}
return returnValue;
}
const QVector<unsigned int> CLandTypes::getLandTypes()
{
QVector<unsigned int> returnValue;
for(QMap<unsigned int, CLandType>::iterator mapLandTypeIterator = (QMap<unsigned int, CLandType>::iterator)d->LandTypes.begin(); mapLandTypeIterator != (QMap<unsigned int, CLandType>::iterator)d->LandTypes.end();++mapLandTypeIterator)
{
returnValue.push_back(mapLandTypeIterator.key());
}
return returnValue;
}
To copy to clipboard, switch view to plain text mode
How can it be done in a better way?
Rumo
Bookmarks