1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-27 17:04:24 +02:00

Code cleanup

This commit is contained in:
2018-03-21 19:09:37 +01:00
parent 4b4a1902ef
commit 992fd2c5cd
3 changed files with 18 additions and 20 deletions

View File

@ -128,7 +128,7 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
ln++;
}
return (ln == 1) ? 1 : 0;
return (ln < 9) ? ln : 0;
}
bool MapFile::parseMapFile(QIODevice &device, QList<CalibrationPoint> &points,
@ -249,7 +249,7 @@ bool MapFile::computeTransformation(QList<CalibrationPoint> &points)
return true;
}
bool MapFile::load(QIODevice &file)
MapFile::MapFile(QIODevice &file)
{
QList<CalibrationPoint> points;
QString ct, datum;
@ -257,13 +257,11 @@ bool MapFile::load(QIODevice &file)
const GCS *gcs;
if (!parseMapFile(file, points, ct, setup, datum))
return false;
return;
if (!(gcs = createGCS(datum)))
return false;
return;
if (!createProjection(gcs, ct, setup, points))
return false;
return;
if (!computeTransformation(points))
return false;
return true;
_image = QString();
}