From: Han Chao Date: Fri, 30 Dec 2016 05:09:58 +0000 (+0800) Subject: Fix clang build error X-Git-Tag: live~3646 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/ade561d3e6b5344987ee1621f07bc07955fe3df1?hp=442994d46d3c00fdc16a746d4020634b4bdda0d3 Fix clang build error 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 #1399 --- diff --git a/lib/quad_tile/quad_tile.h b/lib/quad_tile/quad_tile.h index f868ff515..86fa1802d 100644 --- a/lib/quad_tile/quad_tile.h +++ b/lib/quad_tile/quad_tile.h @@ -1,6 +1,6 @@ #include -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; @@ -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); }