mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-18 19:52:09 +01:00
Dummy non-class callback functions are not needed
This commit is contained in:
parent
29a821f8b2
commit
51becc4bf1
@ -167,11 +167,6 @@ void IMGMap::ll2xy(QList<MapData::Point> &points)
|
||||
}
|
||||
}
|
||||
|
||||
static void render(RasterTile &tile)
|
||||
{
|
||||
tile.render();
|
||||
}
|
||||
|
||||
void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
{
|
||||
Q_UNUSED(flags);
|
||||
@ -224,7 +219,7 @@ void IMGMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
}
|
||||
}
|
||||
|
||||
QFuture<void> future = QtConcurrent::map(tiles, render);
|
||||
QFuture<void> future = QtConcurrent::map(tiles, &RasterTile::render);
|
||||
future.waitForFinished();
|
||||
|
||||
for (int i = 0; i < tiles.size(); i++) {
|
||||
|
@ -49,11 +49,6 @@ private:
|
||||
|
||||
#define META_TYPE(type) static_cast<QMetaType::Type>(type)
|
||||
|
||||
static void render(MBTile &tile)
|
||||
{
|
||||
tile.load();
|
||||
}
|
||||
|
||||
static double index2mercator(int index, int zoom)
|
||||
{
|
||||
return rad2deg(-M_PI + 2 * M_PI * ((double)index / (1<<zoom)));
|
||||
@ -314,7 +309,7 @@ void MBTilesMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
}
|
||||
}
|
||||
|
||||
QFuture<void> future = QtConcurrent::map(tiles, render);
|
||||
QFuture<void> future = QtConcurrent::map(tiles, &MBTile::load);
|
||||
future.waitForFinished();
|
||||
|
||||
for (int i = 0; i < tiles.size(); i++) {
|
||||
|
@ -41,11 +41,6 @@ private:
|
||||
QImage _image;
|
||||
};
|
||||
|
||||
static void render(TileImage &ti)
|
||||
{
|
||||
ti.load();
|
||||
}
|
||||
|
||||
static QString quadKey(const QPoint &xy, int zoom)
|
||||
{
|
||||
QString qk;
|
||||
@ -101,7 +96,7 @@ void TileLoader::loadTilesAsync(QVector<Tile> &list)
|
||||
if (!dl.empty())
|
||||
_downloader->get(dl, _authorization);
|
||||
|
||||
QFuture<void> future = QtConcurrent::map(imgs, render);
|
||||
QFuture<void> future = QtConcurrent::map(imgs, &TileImage::load);
|
||||
future.waitForFinished();
|
||||
|
||||
for (int i = 0; i < imgs.size(); i++) {
|
||||
@ -153,7 +148,7 @@ void TileLoader::loadTilesSync(QVector<Tile> &list)
|
||||
}
|
||||
}
|
||||
|
||||
QFuture<void> future = QtConcurrent::map(imgs, render);
|
||||
QFuture<void> future = QtConcurrent::map(imgs, &TileImage::load);
|
||||
future.waitForFinished();
|
||||
|
||||
for (int i = 0; i < imgs.size(); i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user