Commit a3891570 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Simplify

parent df015efc
......@@ -24,16 +24,12 @@ private:
template<class T>
T* reduce(T* lineString)
{
qint64 prevSize = lineString->size();
T* reducedLine;
qint64 const prevSize = lineString->size();
if (prevSize < 2) {
reducedLine = new T(*lineString);
return reducedLine;
} else {
reducedLine = new T;
return new T(*lineString);
}
T* reducedLine = new T;
QVector<GeoDataCoordinates>::iterator itCoords = lineString->begin();
GeoDataCoordinates currentCoords = *itCoords;
reducedLine->append(*itCoords);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment