From 9ee47e59995f858ec531b3ee467f131594e4ba1f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 13 Apr 2020 18:38:06 +0200 Subject: Using Super. --- src/Generating/VillageGen.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/Generating/VillageGen.cpp') diff --git a/src/Generating/VillageGen.cpp b/src/Generating/VillageGen.cpp index 340d9adb8..21d6e30d4 100644 --- a/src/Generating/VillageGen.cpp +++ b/src/Generating/VillageGen.cpp @@ -37,16 +37,18 @@ per-village density setting, the cVillage class itself implements the cPiecePool calls to the underlying cVillagePiecePool, after processing the density check. */ -class cVillagePiecePool : +class cVillagePiecePool: public cPrefabPiecePool { - typedef cPrefabPiecePool super; + using Super = cPrefabPiecePool; + public: + cVillagePiecePool( const cPrefab::sDef * a_PieceDefs, size_t a_NumPieceDefs, const cPrefab::sDef * a_StartingPieceDefs, size_t a_NumStartingPieceDefs - ) : - super(a_PieceDefs, a_NumPieceDefs, a_StartingPieceDefs, a_NumStartingPieceDefs) + ): + Super(a_PieceDefs, a_NumPieceDefs, a_StartingPieceDefs, a_NumStartingPieceDefs) { AddRoadPieces(); } @@ -107,13 +109,14 @@ public: -class cVillageGen::cVillage : +class cVillageGen::cVillage: public cGridStructGen::cStructure, protected cPiecePool { - typedef cGridStructGen::cStructure super; + using Super = cGridStructGen::cStructure; public: + cVillage( int a_Seed, int a_GridX, int a_GridZ, @@ -123,8 +126,8 @@ public: int a_Density, cVillagePiecePool & a_Prefabs, cTerrainHeightGenPtr a_HeightGen - ) : - super(a_GridX, a_GridZ, a_OriginX, a_OriginZ), + ): + Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ), m_Seed(a_Seed), m_Noise(a_Seed), m_MaxSize(a_MaxSize), @@ -339,7 +342,7 @@ cVillageGen::cVillageGen( int a_SeaLevel, const AStringVector & a_PrefabsToLoad ) : - super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100), + Super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 100), m_RandNoise(a_Seed + 1000), m_MaxDepth(a_MaxDepth), m_MaxSize(a_MaxSize), -- cgit v1.2.3