Skip to content

Commit

Permalink
Fix clang build error
Browse files Browse the repository at this point in the history
By default, Clang builds C code in GNU C11 mode, so it uses
standard C99 semantics for the inline keyword:

http://clang.llvm.org/compatibility.html#inline

Closes openstreetmap#1399
  • Loading branch information
hanchao authored and tomhughes committed Dec 30, 2016
1 parent 442994d commit ade561d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/quad_tile/quad_tile.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <math.h>

inline unsigned int xy2tile(unsigned int x, unsigned int y)
static inline unsigned int xy2tile(unsigned int x, unsigned int y)
{
unsigned int tile = 0;
int i;
Expand All @@ -14,12 +14,12 @@ inline unsigned int xy2tile(unsigned int x, unsigned int y)
return tile;
}

inline unsigned int lon2x(double lon)
static inline unsigned int lon2x(double lon)
{
return round((lon + 180.0) * 65535.0 / 360.0);
}

inline unsigned int lat2y(double lat)
static inline unsigned int lat2y(double lat)
{
return round((lat + 90.0) * 65535.0 / 180.0);
}

0 comments on commit ade561d

Please sign in to comment.