Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix build on i386 and with older PDALs
- Loading branch information
|
@@ -10,7 +10,7 @@ |
|
|
* * |
|
|
****************************************************************************/ |
|
|
|
|
|
|
|
|
#include <vector> |
|
|
#include <pdal/util/FileUtils.hpp> |
|
|
|
|
|
#include "Reprocessor.hpp" |
|
|
|
@@ -102,15 +102,15 @@ namespace std |
|
|
{ |
|
|
template<> struct hash<untwine::VoxelKey> |
|
|
{ |
|
|
std::size_t operator()(const untwine::VoxelKey& k) const noexcept |
|
|
long long operator()(const untwine::VoxelKey& k) const noexcept |
|
|
{ |
|
|
static_assert(sizeof(size_t) > sizeof(int), "wrong assumption that size_t is 64 bits"); |
|
|
static_assert(sizeof(long long) >= 8, "wrong assumption that long long is 64 bits"); |
|
|
|
|
|
// For this to work well we just assume that the values are no more than than 16 bits. |
|
|
size_t t = size_t(k.x()) << 48; |
|
|
t |= size_t(k.y()) << 32; |
|
|
t |= size_t(k.z()) << 16; |
|
|
t |= size_t(k.level()); |
|
|
long long t = static_cast<long long>(k.x()) << 48; |
|
|
t |= static_cast<long long>(k.y()) << 32; |
|
|
t |= static_cast<long long>(k.z()) << 16; |
|
|
t |= static_cast<long long>(k.level()); |
|
|
return t; |
|
|
} |
|
|
}; |
|
|
|
@@ -4439,8 +4439,8 @@ static bool IsLocalFile( const QString &path ) |
|
|
// Codes from http://man7.org/linux/man-pages/man2/statfs.2.html |
|
|
if ( sStatFS.f_type == 0x6969 /* NFS */ || |
|
|
sStatFS.f_type == 0x517b /* SMB */ || |
|
|
sStatFS.f_type == 0xff534d42 /* CIFS */ || |
|
|
sStatFS.f_type == 0xfe534d42 /* CIFS */ ) |
|
|
sStatFS.f_type == 0xff534d42ul /* CIFS */ || |
|
|
sStatFS.f_type == 0xfe534d42ul /* CIFS */ ) |
|
|
{ |
|
|
return false; |
|
|
} |
|
|
|
@@ -73,8 +73,8 @@ void QgsCapabilitiesCache::insertCapabilitiesDocument( const QString &configFile |
|
|
if ( statfs( configFilePath.toUtf8().constData(), &sStatFS ) == 0 && |
|
|
( sStatFS.f_type == 0x6969 /* NFS */ || |
|
|
sStatFS.f_type == 0x517b /* SMB */ || |
|
|
sStatFS.f_type == 0xff534d42 /* CIFS */ || |
|
|
sStatFS.f_type == 0xfe534d42 /* CIFS */ ) ) |
|
|
sStatFS.f_type == 0xff534d42ul /* CIFS */ || |
|
|
sStatFS.f_type == 0xfe534d42ul /* CIFS */ ) ) |
|
|
{ |
|
|
QFileInfo fi( configFilePath ); |
|
|
mCachedCapabilitiesTimestamps[ configFilePath ] = fi.lastModified(); |
|
|