mirror of
https://github.com/BertoldVdb/ZoneDetect.git
synced 2026-03-25 08:45:56 +00:00
Merge pull request #34 from osievert/otto/macos
build: fix builder compilation on macOS
This commit is contained in:
commit
795b78da41
2 changed files with 5 additions and 5 deletions
|
|
@ -49,7 +49,7 @@ void errorFatal(std::string what)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
void assert(bool mustBeTrue, std::string what){
|
||||
void assert_(bool mustBeTrue, std::string what){
|
||||
if(!mustBeTrue){
|
||||
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){
|
||||
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 lonu=encodeSignedToUnsigned(lon);
|
||||
|
||||
assert(latu < (uint64_t)1<<32, "Unsigned lat overflow");
|
||||
assert(lonu < (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");
|
||||
|
||||
uint64_t point = 0;
|
||||
for(uint8_t i=31; i<=31; i--){
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
g++ builder.cpp -o builder -lshp
|
||||
g++ builder.cpp --std=c++11 -o builder -lshp
|
||||
|
||||
rm -rf out naturalearth timezone db.zip
|
||||
mkdir -p out
|
||||
|
|
|
|||
Loading…
Reference in a new issue