Skip to content

Commit 0ea9a42

Browse files
committed
Pull out checking of expire options into its own function
1 parent 461b077 commit 0ea9a42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/command-line-parser.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,11 @@ static void check_options(options_t *options)
225225
if (!options->slim && !options->flat_node_file.empty()) {
226226
log_warn("Ignoring --flat-nodes/-F setting in non-slim mode");
227227
}
228+
}
228229

229-
// zoom level 31 is the technical limit because we use 32-bit integers for the x and y index of a tile ID
230+
static void check_options_expire(options_t *options) {
231+
// Zoom level 31 is the technical limit because we use 32-bit integers for
232+
// the x and y index of a tile ID.
230233
if (options->expire_tiles_zoom_min > 31) {
231234
options->expire_tiles_zoom_min = 31;
232235
log_warn("Minimum zoom level for tile expiry is too "
@@ -736,6 +739,8 @@ options_t parse_command_line(int argc, char *argv[])
736739
options.projection = reprojection::create_projection(PROJ_SPHERE_MERC);
737740
}
738741

742+
check_options_expire(&options);
743+
739744
check_options(&options);
740745

741746
options.connection_params = app.connection_params();

0 commit comments

Comments
 (0)