]> git.openstreetmap.org Git - rails.git/commitdiff
Fix clang build error
authorHan Chao <hanchao0123@hotmail.com>
Fri, 30 Dec 2016 05:09:58 +0000 (13:09 +0800)
committerTom Hughes <tom@compton.nu>
Fri, 30 Dec 2016 07:38:28 +0000 (07:38 +0000)
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

lib/quad_tile/quad_tile.h

index f868ff515cbd41033f623567f89c1250355b13e9..86fa1802dfd117b7234a6ca1f50837152ed84e40 100644 (file)
@@ -1,6 +1,6 @@
 #include <math.h>
 
 #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;
 {
    unsigned int tile = 0;
    int          i;
@@ -14,12 +14,12 @@ inline unsigned int xy2tile(unsigned int x, unsigned int y)
    return tile;
 }
 
    return tile;
 }
 
-inline unsigned int lon2x(double lon)
+static inline unsigned int lon2x(double lon)
 {
    return round((lon + 180.0) * 65535.0 / 360.0);
 }
 
 {
    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);
 }
 {
    return round((lat + 90.0) * 65535.0 / 180.0);
 }