From 9c3fb0f6696d466d603e06338dc523d7d353b92f Mon Sep 17 00:00:00 2001 From: Shan-Chun Kuo Date: Wed, 24 May 2017 16:32:44 +0100 Subject: [PATCH] Change the function name rawtiles to dirtiles --- Makefile | 2 +- rawtiles.cpp => dirtiles.cpp | 4 ++-- dirtiles.hpp | 1 + rawtiles.hpp | 1 - tile.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename rawtiles.cpp => dirtiles.cpp (87%) create mode 100644 dirtiles.hpp delete mode 100644 rawtiles.hpp diff --git a/Makefile b/Makefile index 47388c97..5ca63688 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ C = $(wildcard *.c) $(wildcard *.cpp) INCLUDES = -I/usr/local/include -I. LIBS = -L/usr/local/lib -tippecanoe: geojson.o jsonpull/jsonpull.o tile.o pool.o mbtiles.o geometry.o projection.o memfile.o mvt.o serial.o main.o text.o rawtiles.o +tippecanoe: geojson.o jsonpull/jsonpull.o tile.o pool.o mbtiles.o geometry.o projection.o memfile.o mvt.o serial.o main.o text.o dirtiles.o $(CXX) $(PG) $(LIBS) $(FINAL_FLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -lm -lz -lsqlite3 -lpthread tippecanoe-enumerate: enumerate.o diff --git a/rawtiles.cpp b/dirtiles.cpp similarity index 87% rename from rawtiles.cpp rename to dirtiles.cpp index 1c7ecc4a..cf122e8b 100644 --- a/rawtiles.cpp +++ b/dirtiles.cpp @@ -2,9 +2,9 @@ #include #include #include -#include "rawtiles.hpp" +#include "dirtiles.hpp" -void write_raw_tile(const char *outdir, int z, int tx, int ty, std::string const &pbf) { +void dir_write_tile(const char *outdir, int z, int tx, int ty, std::string const &pbf) { mkdir(outdir, S_IRWXU | S_IRWXG | S_IRWXO); std::string curdir(outdir); std::string slash("/"); diff --git a/dirtiles.hpp b/dirtiles.hpp new file mode 100644 index 00000000..f205b15f --- /dev/null +++ b/dirtiles.hpp @@ -0,0 +1 @@ +void dir_write_tile(const char *outdir, int z, int tx, int ty, std::string const &pbf); diff --git a/rawtiles.hpp b/rawtiles.hpp deleted file mode 100644 index 1a332c94..00000000 --- a/rawtiles.hpp +++ /dev/null @@ -1 +0,0 @@ -void write_raw_tile(const char *outdir, int z, int tx, int ty, std::string const &pbf); diff --git a/tile.cpp b/tile.cpp index 9d43bc50..3056d570 100644 --- a/tile.cpp +++ b/tile.cpp @@ -22,7 +22,7 @@ #include #include "mvt.hpp" #include "mbtiles.hpp" -#include "rawtiles.hpp" +#include "dirtiles.hpp" #include "geometry.hpp" #include "tile.hpp" #include "pool.hpp" @@ -1921,7 +1921,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s if (outdb != NULL) { mbtiles_write_tile(outdb, z, tx, ty, compressed.data(), compressed.size()); } else if (outdir != NULL) { - write_raw_tile(outdir, z, tx, ty, compressed); + dir_write_tile(outdir, z, tx, ty, compressed); } if (pthread_mutex_unlock(&db_lock) != 0) {