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

Added missing namespace

This commit is contained in:
2021-09-20 21:43:17 +02:00
parent f5078074cf
commit e47cbc9af3
10 changed files with 38 additions and 27 deletions

View File

@ -5,37 +5,40 @@
#define LS(val, bits) ((qint32)(((quint32)(val))<<(bits)))
inline double toWGS32(qint32 v)
namespace Garmin
{
return ((double)v / (double)(1U<<31)) * 180.0;
}
inline double toWGS32(qint32 v)
{
return ((double)v / (double)(1U<<31)) * 180.0;
}
inline double toWGS24(qint32 v)
{
return toWGS32(LS(v, 8));
}
inline double toWGS24(qint32 v)
{
return toWGS32(LS(v, 8));
}
inline quint8 vs(const quint8 b0)
{
static const quint8 sizes[] = {4, 1, 2, 1, 3, 1, 2, 1};
return sizes[b0 & 0x07];
}
inline quint8 vs(const quint8 b0)
{
static const quint8 sizes[] = {4, 1, 2, 1, 3, 1, 2, 1};
return sizes[b0 & 0x07];
}
inline quint8 bs(const quint8 val)
{
return (val + 7) >> 3;
}
inline quint8 bs(const quint8 val)
{
return (val + 7) >> 3;
}
inline quint8 byteSize(quint32 val)
{
quint8 ret = 0;
inline quint8 byteSize(quint32 val)
{
quint8 ret = 0;
do {
ret++;
val = val >> 8;
} while (val != 0);
do {
ret++;
val = val >> 8;
} while (val != 0);
return ret;
return ret;
}
}
#endif // GARMIN_H