Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
better defaults handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vaclavblazek committed Nov 28, 2019
1 parent 45d99d8 commit 5759084
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
18 changes: 5 additions & 13 deletions mapproxy/src/mapproxy/generator/metatile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,13 @@
struct MetatileOverrides {
enum class CreditsMode { replace, add };

vts::SubMesh::TextureMode textureMode;
vts::SubMesh::TextureMode textureMode = vts::SubMesh::external;
DualId::set credits;
CreditsMode creditsMode;

MetatileOverrides()
: textureMode(vts::SubMesh::external)
, creditsMode(CreditsMode::add)
{}
CreditsMode creditsMode = CreditsMode::add;

MetatileOverrides() = default;
MetatileOverrides(vts::SubMesh::TextureMode textureMode)
: textureMode(textureMode)
, creditsMode(CreditsMode::add)

{}

void addCredits(const DualId::set &addition);
Expand All @@ -73,8 +67,7 @@ vts::MetaTile metatileFromDem(const vts::TileId &tileId, Sink &sink
= boost::none
, const HeightFunction::pointer &heightFunction
= HeightFunction::pointer()
, const MetatileOverrides &overrides
= MetatileOverrides());
, const MetatileOverrides &overrides = {});

vts::MetaTile metatileFromDem(const vts::TileId &tileId, Sink &sink
, Arsenal &arsenal
Expand All @@ -87,8 +80,7 @@ vts::MetaTile metatileFromDem(const vts::TileId &tileId, Sink &sink
= boost::none
, const HeightFunction::pointer &heightFunction
= HeightFunction::pointer()
, const MetatileOverrides &overrides
= MetatileOverrides());
, const MetatileOverrides &overrides = {});

// inines

Expand Down
2 changes: 1 addition & 1 deletion mapproxy/src/mapproxy/generator/surface-dem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class SurfaceDem : public SurfaceBase {
vts::MetaTile generateMetatileImpl(const vts::TileId &tileId
, Sink &sink, Arsenal &arsenal
, const MetatileOverrides &overrides
= MetatileOverrides())
= {})
const;

void addToRegistry();
Expand Down
4 changes: 2 additions & 2 deletions mapproxy/src/mapproxy/generator/surface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class SurfaceBase : public Generator {
, Sink &sink
, const SurfaceFileInfo &fileInfo
, Arsenal &arsenal
, const MetatileOverrides &overrides
= MetatileOverrides()) const = 0;
, const MetatileOverrides &overrides = {})
const = 0;

void generateMesh(const vts::TileId &tileId
, Sink &sink
Expand Down

0 comments on commit 5759084

Please sign in to comment.