Merge pull request #34 from osievert/otto/macos

build: fix builder compilation on macOS
This commit is contained in:
Bertold Van den Bergh 2022-01-27 23:34:36 +01:00 committed by GitHub
commit 795b78da41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -49,7 +49,7 @@ void errorFatal(std::string what)
exit(1); exit(1);
} }
void assert(bool mustBeTrue, std::string what){ void assert_(bool mustBeTrue, std::string what){
if(!mustBeTrue){ if(!mustBeTrue){
errorFatal(what); errorFatal(what);
} }
@ -87,13 +87,13 @@ int encodeVariableLength(std::vector<uint8_t>& output, int64_t valueIn, bool han
} }
uint64_t encodePointTo64(int64_t lat, int64_t lon){ uint64_t encodePointTo64(int64_t lat, int64_t lon){
assert(lat || lon, "Tried to encode 0,0. This is not allowed"); assert_(lat || lon, "Tried to encode 0,0. This is not allowed");
uint64_t latu=encodeSignedToUnsigned(lat); uint64_t latu=encodeSignedToUnsigned(lat);
uint64_t lonu=encodeSignedToUnsigned(lon); uint64_t lonu=encodeSignedToUnsigned(lon);
assert(latu < (uint64_t)1<<32, "Unsigned lat overflow"); assert_(latu < (uint64_t)1<<32, "Unsigned lat overflow");
assert(lonu < (uint64_t)1<<32, "Unsigned lat overflow"); assert_(lonu < (uint64_t)1<<32, "Unsigned lat overflow");
uint64_t point = 0; uint64_t point = 0;
for(uint8_t i=31; i<=31; i--){ for(uint8_t i=31; i<=31; i--){

View file

@ -2,7 +2,7 @@
set -e set -e
g++ builder.cpp -o builder -lshp g++ builder.cpp --std=c++11 -o builder -lshp
rm -rf out naturalearth timezone db.zip rm -rf out naturalearth timezone db.zip
mkdir -p out mkdir -p out