1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 03:29:16 +02:00

Fixed build with older Qt versions

This commit is contained in:
2023-03-01 00:23:01 +01:00
parent 7be3a27196
commit 267094dc6c
3 changed files with 8 additions and 3 deletions

View File

@ -21,8 +21,6 @@
#include "common/rectc.h"
#include "dem.h"
#define CACHE_SIZE 536870912 /* 512MB */
#define SRTM3_SAMPLES 1201
#define SRTM1_SAMPLES 3601
#define SRTM05_SAMPLES 7201
@ -89,13 +87,18 @@ QString DEM::Tile::baseName() const
}
QString DEM::_dir;
DEM::TileCache DEM::_data = DEM::TileCache(CACHE_SIZE);
DEM::TileCache DEM::_data;
QString DEM::fileName(const QString &baseName)
{
return QDir(_dir).absoluteFilePath(baseName);
}
void DEM::setCacheSize(int size)
{
_data.setMaxCost(size);
}
void DEM::setDir(const QString &path)
{
_dir = path;

View File

@ -34,6 +34,7 @@ public:
int _lon, _lat;
};
static void setCacheSize(int size);
static void setDir(const QString &path);
static void clearCache();
static qreal elevation(const Coordinates &c);