Skip to content

Commit 9742572

Browse files
authored
Move xyzo_to_meta into proper header file (openstreetmap#456)
1 parent 3120d0b commit 9742572

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

includes/store_file.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ extern "C" {
2525
#include "store.h"
2626

2727
struct storage_backend *init_storage_file(const char *tile_dir);
28-
int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, const char *options, int x, int y, int z);
2928

3029
#ifdef __cplusplus
3130
}

includes/store_file_utils.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@ extern "C" {
3232
*/
3333
int mkdirp(const char *path);
3434

35+
/* File path hashing. Used by both mod_tile and render daemon
36+
* The two must both agree on the file layout for meta-tiling
37+
* to work
38+
*/
3539
int path_to_xyz(const char *tilepath, const char *path, char *xmlconfig, int *px, int *py, int *pz);
3640

3741
#ifdef METATILE
3842
/* New meta-tile storage functions */
3943
/* Returns the path to the meta-tile and the offset within the meta-tile */
44+
int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, const char *options, int x, int y, int z);
4045
int xyz_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z);
4146
#else
42-
/* File path hashing. Used by both mod_tile and render daemon
43-
* The two must both agree on the file layout for meta-tiling
44-
* to work
45-
*/
4647
void xyz_to_path(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z);
4748
#endif
4849

src/store_file_utils.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,6 @@ int path_to_xyz(const char *tilepath, const char *path, char *xmlconfig, int *px
171171
}
172172

173173
#ifdef METATILE
174-
// Returns the path to the meta-tile and the offset within the meta-tile
175-
int xyz_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z)
176-
{
177-
return xyzo_to_meta(path, len, tile_dir, xmlconfig, "", x, y, z);
178-
}
179-
180174
// Returns the path to the meta-tile and the offset within the meta-tile
181175
int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, const char *options, int x, int y, int z)
182176
{
@@ -214,6 +208,12 @@ int xyzo_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlco
214208
#endif // DIRECTORY_HASH
215209
return offset;
216210
}
211+
212+
// Returns the path to the meta-tile and the offset within the meta-tile
213+
int xyz_to_meta(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z)
214+
{
215+
return xyzo_to_meta(path, len, tile_dir, xmlconfig, "", x, y, z);
216+
}
217217
#else // METATILE
218218
void xyz_to_path(char *path, size_t len, const char *tile_dir, const char *xmlconfig, int x, int y, int z)
219219
{

0 commit comments

Comments
 (0)