Skip to content

Commit

Permalink
Apply clang-format as per project guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
kkirov committed Dec 28, 2024
1 parent 9a4e51a commit c8b5f72
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions bin/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ int main(int argc, char* argv[]) {
args::ValueFlag<uint32_t> widthValue(argumentParser, "pixels", "Image width", {'w', "width"});
args::ValueFlag<uint32_t> heightValue(argumentParser, "pixels", "Image height", {'h', "height"});

args::ValueFlag<std::string> mapModeValue(argumentParser, "MapMode", "Map mode (e.g. 'static', 'tile', 'continuous')", {'m', "mode"});
args::ValueFlag<std::string> mapModeValue(
argumentParser, "MapMode", "Map mode (e.g. 'static', 'tile', 'continuous')", {'m', "mode"});

try {
argumentParser.ParseCLI(argc, argv);
Expand Down Expand Up @@ -88,21 +89,19 @@ int main(int argc, char* argv[]) {
mapMode = MapMode::Tile;
} else if (modeStr == "continuous") {
mapMode = MapMode::Continuous;
}
}
}

HeadlessFrontend frontend({width, height}, static_cast<float>(pixelRatio));
Map map(frontend,
MapObserver::nullObserver(),
MapOptions()
.withMapMode(mapMode)
.withSize(frontend.getSize())
.withPixelRatio(static_cast<float>(pixelRatio)),
ResourceOptions()
.withCachePath(cache_file)
.withAssetPath(asset_root)
.withApiKey(apikey)
.withTileServerOptions(mapTilerConfiguration));
Map map(
frontend,
MapObserver::nullObserver(),
MapOptions().withMapMode(mapMode).withSize(frontend.getSize()).withPixelRatio(static_cast<float>(pixelRatio)),
ResourceOptions()
.withCachePath(cache_file)
.withAssetPath(asset_root)
.withApiKey(apikey)
.withTileServerOptions(mapTilerConfiguration));

if (style.find("://") == std::string::npos) {
style = std::string("file://") + style;
Expand Down

0 comments on commit c8b5f72

Please sign in to comment.