summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Bindings/LuaChunkStay.cpp2
-rw-r--r--src/Bindings/LuaChunkStay.h6
-rw-r--r--src/Bindings/LuaJson.cpp3
-rw-r--r--src/Bindings/LuaState.h7
-rw-r--r--src/Bindings/LuaWindow.h2
-rw-r--r--src/Bindings/ManualBindings.h1
-rw-r--r--src/Bindings/PluginLua.cpp2
-rw-r--r--src/Bindings/PluginLua.h14
-rw-r--r--src/BlockEntities/BeaconEntity.cpp4
-rw-r--r--src/BlockEntities/BeaconEntity.h4
-rw-r--r--src/BlockEntities/BedEntity.cpp4
-rw-r--r--src/BlockEntities/BedEntity.h4
-rw-r--r--src/BlockEntities/BlockEntity.h4
-rw-r--r--src/BlockEntities/BlockEntityWithItems.cpp4
-rw-r--r--src/BlockEntities/BlockEntityWithItems.h2
-rw-r--r--src/BlockEntities/BrewingstandEntity.cpp8
-rw-r--r--src/BlockEntities/BrewingstandEntity.h2
-rw-r--r--src/BlockEntities/ChestEntity.cpp4
-rw-r--r--src/BlockEntities/ChestEntity.h2
-rw-r--r--src/BlockEntities/CommandBlockEntity.cpp4
-rw-r--r--src/BlockEntities/CommandBlockEntity.h2
-rw-r--r--src/BlockEntities/DispenserEntity.cpp2
-rw-r--r--src/BlockEntities/DispenserEntity.h2
-rw-r--r--src/BlockEntities/DropSpenserEntity.cpp4
-rw-r--r--src/BlockEntities/DropSpenserEntity.h2
-rw-r--r--src/BlockEntities/DropperEntity.cpp2
-rw-r--r--src/BlockEntities/DropperEntity.h2
-rw-r--r--src/BlockEntities/EnderChestEntity.cpp2
-rw-r--r--src/BlockEntities/EnderChestEntity.h2
-rw-r--r--src/BlockEntities/FlowerPotEntity.cpp4
-rw-r--r--src/BlockEntities/FlowerPotEntity.h2
-rw-r--r--src/BlockEntities/FurnaceEntity.cpp8
-rw-r--r--src/BlockEntities/FurnaceEntity.h2
-rw-r--r--src/BlockEntities/HopperEntity.cpp4
-rw-r--r--src/BlockEntities/HopperEntity.h2
-rw-r--r--src/BlockEntities/JukeboxEntity.cpp4
-rw-r--r--src/BlockEntities/JukeboxEntity.h2
-rw-r--r--src/BlockEntities/MobHeadEntity.cpp4
-rw-r--r--src/BlockEntities/MobHeadEntity.h2
-rw-r--r--src/BlockEntities/MobSpawnerEntity.cpp4
-rw-r--r--src/BlockEntities/MobSpawnerEntity.h2
-rw-r--r--src/BlockEntities/NoteEntity.cpp4
-rw-r--r--src/BlockEntities/NoteEntity.h2
-rw-r--r--src/BlockEntities/SignEntity.cpp4
-rw-r--r--src/BlockEntities/SignEntity.h2
-rw-r--r--src/Blocks/BlockAnvil.h11
-rw-r--r--src/Blocks/BlockBed.h4
-rw-r--r--src/Blocks/BlockBigFlower.h4
-rw-r--r--src/Blocks/BlockBrewingStand.h4
-rw-r--r--src/Blocks/BlockButton.h4
-rw-r--r--src/Blocks/BlockCactus.h6
-rw-r--r--src/Blocks/BlockCake.h4
-rw-r--r--src/Blocks/BlockCarpet.h4
-rw-r--r--src/Blocks/BlockCauldron.h4
-rw-r--r--src/Blocks/BlockChest.h6
-rw-r--r--src/Blocks/BlockCocoaPod.h4
-rw-r--r--src/Blocks/BlockCommandBlock.h4
-rw-r--r--src/Blocks/BlockComparator.h4
-rw-r--r--src/Blocks/BlockConcretePowder.h6
-rw-r--r--src/Blocks/BlockCrops.h4
-rw-r--r--src/Blocks/BlockDeadBush.h17
-rw-r--r--src/Blocks/BlockDirt.h4
-rw-r--r--src/Blocks/BlockDoor.cpp6
-rw-r--r--src/Blocks/BlockDoor.h4
-rw-r--r--src/Blocks/BlockDropSpenser.h4
-rw-r--r--src/Blocks/BlockEnderchest.h4
-rw-r--r--src/Blocks/BlockEntity.h4
-rw-r--r--src/Blocks/BlockFarmland.h4
-rw-r--r--src/Blocks/BlockFenceGate.h4
-rw-r--r--src/Blocks/BlockFlowerPot.h4
-rw-r--r--src/Blocks/BlockFluid.h20
-rw-r--r--src/Blocks/BlockFurnace.h4
-rw-r--r--src/Blocks/BlockHopper.h4
-rw-r--r--src/Blocks/BlockIce.h4
-rw-r--r--src/Blocks/BlockLadder.h4
-rw-r--r--src/Blocks/BlockLever.h8
-rw-r--r--src/Blocks/BlockLilypad.h9
-rw-r--r--src/Blocks/BlockMelon.h4
-rw-r--r--src/Blocks/BlockMobHead.h4
-rw-r--r--src/Blocks/BlockMushroom.h4
-rw-r--r--src/Blocks/BlockNetherWart.h4
-rw-r--r--src/Blocks/BlockObserver.h4
-rw-r--r--src/Blocks/BlockOre.h9
-rw-r--r--src/Blocks/BlockPiston.cpp4
-rw-r--r--src/Blocks/BlockPiston.h4
-rw-r--r--src/Blocks/BlockPlant.h4
-rw-r--r--src/Blocks/BlockPressurePlate.h4
-rw-r--r--src/Blocks/BlockPumpkin.h4
-rw-r--r--src/Blocks/BlockRail.h8
-rw-r--r--src/Blocks/BlockRedstone.h4
-rw-r--r--src/Blocks/BlockRedstoneRepeater.h4
-rw-r--r--src/Blocks/BlockRedstoneTorch.h4
-rw-r--r--src/Blocks/BlockSapling.h4
-rw-r--r--src/Blocks/BlockSeaLantern.h4
-rw-r--r--src/Blocks/BlockSideways.h4
-rw-r--r--src/Blocks/BlockSignPost.h4
-rw-r--r--src/Blocks/BlockSlab.h8
-rw-r--r--src/Blocks/BlockSponge.h6
-rw-r--r--src/Blocks/BlockStairs.h4
-rw-r--r--src/Blocks/BlockStems.h4
-rw-r--r--src/Blocks/BlockStone.h4
-rw-r--r--src/Blocks/BlockSugarcane.h6
-rw-r--r--src/Blocks/BlockTallGrass.h4
-rw-r--r--src/Blocks/BlockTorch.h4
-rw-r--r--src/Blocks/BlockTrapdoor.h4
-rw-r--r--src/Blocks/BlockTripwire.h4
-rw-r--r--src/Blocks/BlockTripwireHook.h4
-rw-r--r--src/Blocks/BlockVine.h4
-rw-r--r--src/Blocks/BlockWallSign.h4
-rw-r--r--src/Blocks/Mixins.h14
-rw-r--r--src/ChunkSender.cpp4
-rw-r--r--src/ChunkSender.h4
-rw-r--r--src/CommandOutput.h9
-rw-r--r--src/CompositeChat.cpp14
-rw-r--r--src/CompositeChat.h63
-rw-r--r--src/DeadlockDetect.cpp4
-rw-r--r--src/DeadlockDetect.h9
-rw-r--r--src/Entities/ArrowEntity.cpp10
-rw-r--r--src/Entities/ArrowEntity.h2
-rw-r--r--src/Entities/Boat.cpp8
-rw-r--r--src/Entities/Boat.h8
-rw-r--r--src/Entities/EnderCrystal.cpp4
-rw-r--r--src/Entities/EnderCrystal.h2
-rw-r--r--src/Entities/Entity.cpp4
-rw-r--r--src/Entities/Entity.h4
-rw-r--r--src/Entities/EntityEffect.cpp10
-rw-r--r--src/Entities/EntityEffect.h138
-rw-r--r--src/Entities/ExpBottleEntity.cpp2
-rw-r--r--src/Entities/ExpBottleEntity.h2
-rw-r--r--src/Entities/ExpOrb.cpp4
-rw-r--r--src/Entities/ExpOrb.h9
-rw-r--r--src/Entities/FallingBlock.cpp2
-rw-r--r--src/Entities/FallingBlock.h2
-rw-r--r--src/Entities/FireChargeEntity.cpp4
-rw-r--r--src/Entities/FireChargeEntity.h2
-rw-r--r--src/Entities/FireworkEntity.cpp4
-rw-r--r--src/Entities/FireworkEntity.h2
-rw-r--r--src/Entities/Floater.cpp2
-rw-r--r--src/Entities/Floater.h2
-rw-r--r--src/Entities/GhastFireballEntity.cpp2
-rw-r--r--src/Entities/GhastFireballEntity.h2
-rw-r--r--src/Entities/HangingEntity.cpp2
-rw-r--r--src/Entities/HangingEntity.h2
-rw-r--r--src/Entities/ItemFrame.cpp8
-rw-r--r--src/Entities/ItemFrame.h2
-rw-r--r--src/Entities/LeashKnot.cpp8
-rw-r--r--src/Entities/LeashKnot.h2
-rw-r--r--src/Entities/Minecart.cpp26
-rw-r--r--src/Entities/Minecart.h12
-rw-r--r--src/Entities/Painting.cpp4
-rw-r--r--src/Entities/Painting.h4
-rw-r--r--src/Entities/Pawn.cpp14
-rw-r--r--src/Entities/Pawn.h5
-rw-r--r--src/Entities/Pickup.cpp6
-rw-r--r--src/Entities/Pickup.h2
-rw-r--r--src/Entities/Player.cpp20
-rw-r--r--src/Entities/Player.h10
-rw-r--r--src/Entities/ProjectileEntity.cpp6
-rw-r--r--src/Entities/ProjectileEntity.h2
-rw-r--r--src/Entities/SplashPotionEntity.cpp2
-rw-r--r--src/Entities/SplashPotionEntity.h4
-rw-r--r--src/Entities/TNTEntity.cpp4
-rw-r--r--src/Entities/TNTEntity.h9
-rw-r--r--src/Entities/ThrownEggEntity.cpp4
-rw-r--r--src/Entities/ThrownEggEntity.h2
-rw-r--r--src/Entities/ThrownEnderPearlEntity.cpp4
-rw-r--r--src/Entities/ThrownEnderPearlEntity.h2
-rw-r--r--src/Entities/ThrownSnowballEntity.cpp6
-rw-r--r--src/Entities/ThrownSnowballEntity.h2
-rw-r--r--src/Entities/WitherSkullEntity.cpp2
-rw-r--r--src/Entities/WitherSkullEntity.h2
-rw-r--r--src/Generating/BioGen.cpp8
-rw-r--r--src/Generating/BioGen.h42
-rw-r--r--src/Generating/Caves.cpp7
-rw-r--r--src/Generating/Caves.h9
-rw-r--r--src/Generating/ComposableGenerator.h5
-rw-r--r--src/Generating/DungeonRoomsFinisher.cpp10
-rw-r--r--src/Generating/DungeonRoomsFinisher.h5
-rw-r--r--src/Generating/FinishGen.h11
-rw-r--r--src/Generating/GridStructGen.cpp7
-rw-r--r--src/Generating/HeiGen.cpp3
-rw-r--r--src/Generating/HeiGen.h7
-rw-r--r--src/Generating/IntGen.h235
-rw-r--r--src/Generating/MineShafts.cpp45
-rw-r--r--src/Generating/MineShafts.h2
-rw-r--r--src/Generating/Noise3DGenerator.h5
-rw-r--r--src/Generating/PieceStructuresGen.cpp3
-rw-r--r--src/Generating/PieceStructuresGen.h5
-rw-r--r--src/Generating/PrefabStructure.h3
-rw-r--r--src/Generating/ProtIntGen.h225
-rw-r--r--src/Generating/Ravines.cpp10
-rw-r--r--src/Generating/Ravines.h7
-rw-r--r--src/Generating/RoughRavines.cpp13
-rw-r--r--src/Generating/RoughRavines.h5
-rw-r--r--src/Generating/TwoHeights.cpp4
-rw-r--r--src/Generating/VillageGen.cpp21
-rw-r--r--src/Generating/VillageGen.h6
-rw-r--r--src/HTTP/HTTPMessage.cpp2
-rw-r--r--src/HTTP/HTTPMessage.h15
-rw-r--r--src/HTTP/SslHTTPServerConnection.cpp4
-rw-r--r--src/HTTP/SslHTTPServerConnection.h5
-rw-r--r--src/HTTP/TransferEncodingParser.cpp6
-rw-r--r--src/HTTP/UrlClient.cpp3
-rw-r--r--src/IniFile.h10
-rw-r--r--src/Items/ItemAxe.h12
-rw-r--r--src/Items/ItemBigFlower.h5
-rw-r--r--src/Items/ItemBoat.h9
-rw-r--r--src/Items/ItemBow.h9
-rw-r--r--src/Items/ItemChest.h6
-rw-r--r--src/Items/ItemCookedFish.h9
-rw-r--r--src/Items/ItemDye.h4
-rw-r--r--src/Items/ItemEmptyMap.h9
-rw-r--r--src/Items/ItemFishingRod.h9
-rw-r--r--src/Items/ItemFood.h11
-rw-r--r--src/Items/ItemFoodSeeds.h11
-rw-r--r--src/Items/ItemGoldenApple.h9
-rw-r--r--src/Items/ItemLeaves.h11
-rw-r--r--src/Items/ItemLilypad.h7
-rw-r--r--src/Items/ItemMap.h9
-rw-r--r--src/Items/ItemMilk.h6
-rw-r--r--src/Items/ItemMinecart.h9
-rw-r--r--src/Items/ItemMobHead.h11
-rw-r--r--src/Items/ItemPickaxe.h14
-rw-r--r--src/Items/ItemPoisonousPotato.h11
-rw-r--r--src/Items/ItemPotion.h4
-rw-r--r--src/Items/ItemPumpkin.h9
-rw-r--r--src/Items/ItemRawChicken.h11
-rw-r--r--src/Items/ItemRawFish.h11
-rw-r--r--src/Items/ItemRottenFlesh.h11
-rw-r--r--src/Items/ItemSapling.h12
-rw-r--r--src/Items/ItemShears.h14
-rw-r--r--src/Items/ItemShovel.h15
-rw-r--r--src/Items/ItemSign.h12
-rw-r--r--src/Items/ItemSlab.h6
-rw-r--r--src/Items/ItemSoup.h9
-rw-r--r--src/Items/ItemSpiderEye.h11
-rw-r--r--src/Items/ItemSword.h10
-rw-r--r--src/Items/ItemThrowable.h58
-rw-r--r--src/LightingThread.cpp4
-rw-r--r--src/LightingThread.h4
-rw-r--r--src/LineBlockTracer.cpp2
-rw-r--r--src/LineBlockTracer.h5
-rw-r--r--src/LoggerListeners.cpp12
-rw-r--r--src/Mobs/AggressiveMonster.cpp8
-rw-r--r--src/Mobs/AggressiveMonster.h14
-rw-r--r--src/Mobs/Bat.cpp2
-rw-r--r--src/Mobs/Bat.h7
-rw-r--r--src/Mobs/Blaze.cpp4
-rw-r--r--src/Mobs/Blaze.h7
-rw-r--r--src/Mobs/CaveSpider.cpp6
-rw-r--r--src/Mobs/CaveSpider.h7
-rw-r--r--src/Mobs/Chicken.cpp6
-rw-r--r--src/Mobs/Chicken.h7
-rw-r--r--src/Mobs/Cow.cpp4
-rw-r--r--src/Mobs/Cow.h5
-rw-r--r--src/Mobs/Creeper.cpp8
-rw-r--r--src/Mobs/Creeper.h7
-rw-r--r--src/Mobs/EnderDragon.cpp2
-rw-r--r--src/Mobs/EnderDragon.h7
-rw-r--r--src/Mobs/Enderman.cpp8
-rw-r--r--src/Mobs/Enderman.h7
-rw-r--r--src/Mobs/Ghast.cpp6
-rw-r--r--src/Mobs/Ghast.h7
-rw-r--r--src/Mobs/Giant.cpp2
-rw-r--r--src/Mobs/Giant.h5
-rw-r--r--src/Mobs/Guardian.cpp4
-rw-r--r--src/Mobs/Guardian.h5
-rw-r--r--src/Mobs/Horse.cpp10
-rw-r--r--src/Mobs/Horse.h5
-rw-r--r--src/Mobs/IronGolem.cpp2
-rw-r--r--src/Mobs/IronGolem.h7
-rw-r--r--src/Mobs/MagmaCube.cpp2
-rw-r--r--src/Mobs/MagmaCube.h5
-rw-r--r--src/Mobs/Monster.cpp18
-rw-r--r--src/Mobs/Monster.h10
-rw-r--r--src/Mobs/Mooshroom.cpp2
-rw-r--r--src/Mobs/Mooshroom.h7
-rw-r--r--src/Mobs/Ocelot.cpp10
-rw-r--r--src/Mobs/Ocelot.h4
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp4
-rw-r--r--src/Mobs/PassiveAggressiveMonster.h15
-rw-r--r--src/Mobs/PassiveMonster.cpp10
-rw-r--r--src/Mobs/PassiveMonster.h15
-rw-r--r--src/Mobs/Pig.cpp8
-rw-r--r--src/Mobs/Pig.h7
-rw-r--r--src/Mobs/Rabbit.cpp2
-rw-r--r--src/Mobs/Rabbit.h5
-rw-r--r--src/Mobs/Sheep.cpp6
-rw-r--r--src/Mobs/Sheep.h4
-rw-r--r--src/Mobs/Silverfish.h9
-rw-r--r--src/Mobs/Skeleton.cpp4
-rw-r--r--src/Mobs/Skeleton.h7
-rw-r--r--src/Mobs/Slime.cpp6
-rw-r--r--src/Mobs/Slime.h5
-rw-r--r--src/Mobs/SnowGolem.cpp4
-rw-r--r--src/Mobs/SnowGolem.h7
-rw-r--r--src/Mobs/Spider.cpp6
-rw-r--r--src/Mobs/Spider.h7
-rw-r--r--src/Mobs/Squid.cpp4
-rw-r--r--src/Mobs/Squid.h5
-rw-r--r--src/Mobs/Villager.cpp8
-rw-r--r--src/Mobs/Villager.h4
-rw-r--r--src/Mobs/Witch.cpp2
-rw-r--r--src/Mobs/Witch.h5
-rw-r--r--src/Mobs/Wither.cpp8
-rw-r--r--src/Mobs/Wither.h7
-rw-r--r--src/Mobs/WitherSkeleton.cpp6
-rw-r--r--src/Mobs/WitherSkeleton.h7
-rw-r--r--src/Mobs/Wolf.cpp8
-rw-r--r--src/Mobs/Wolf.h7
-rw-r--r--src/Mobs/Zombie.cpp2
-rw-r--r--src/Mobs/Zombie.h5
-rw-r--r--src/Mobs/ZombiePigman.cpp6
-rw-r--r--src/Mobs/ZombiePigman.h7
-rw-r--r--src/Mobs/ZombieVillager.cpp6
-rw-r--r--src/Mobs/ZombieVillager.h5
-rw-r--r--src/OSSupport/ServerHandleImpl.h3
-rw-r--r--src/OSSupport/TCPLinkImpl.cpp4
-rw-r--r--src/OSSupport/TCPLinkImpl.h3
-rw-r--r--src/OSSupport/UDPEndpointImpl.cpp2
-rw-r--r--src/OSSupport/UDPEndpointImpl.h3
-rw-r--r--src/Protocol/Authenticator.cpp6
-rw-r--r--src/Protocol/Authenticator.h7
-rw-r--r--src/Protocol/MojangAPI.cpp10
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp2
-rw-r--r--src/Protocol/ProtocolRecognizer.h2
-rw-r--r--src/Protocol/Protocol_1_10.h5
-rw-r--r--src/Protocol/Protocol_1_11.h10
-rw-r--r--src/Protocol/Protocol_1_12.h13
-rw-r--r--src/Protocol/Protocol_1_13.h5
-rw-r--r--src/Protocol/Protocol_1_8.cpp2
-rw-r--r--src/Protocol/Protocol_1_8.h4
-rw-r--r--src/Protocol/Protocol_1_9.h19
-rw-r--r--src/Server.cpp2
-rw-r--r--src/Server.h8
-rw-r--r--src/Simulator/DelayedFluidSimulator.cpp2
-rw-r--r--src/Simulator/DelayedFluidSimulator.h5
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp2
-rw-r--r--src/Simulator/FloodyFluidSimulator.h6
-rw-r--r--src/Simulator/FluidSimulator.cpp2
-rw-r--r--src/Simulator/FluidSimulator.h5
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/CommandBlockHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/HopperHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h10
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/PistonHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/PoweredRailHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneBlockHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneRepeaterHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneToggleHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/SolidBlockHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/TrappedChestHandler.h6
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h6
-rw-r--r--src/Simulator/NoopFluidSimulator.h9
-rw-r--r--src/Simulator/NoopRedstoneSimulator.h9
-rw-r--r--src/Simulator/RedstoneSimulator.h9
-rw-r--r--src/Simulator/VanillaFluidSimulator.cpp3
-rw-r--r--src/Simulator/VanillaFluidSimulator.h14
-rw-r--r--src/Simulator/VaporizeFluidSimulator.cpp2
-rw-r--r--src/Simulator/VaporizeFluidSimulator.h5
-rw-r--r--src/UI/AnvilWindow.cpp2
-rw-r--r--src/UI/AnvilWindow.h5
-rw-r--r--src/UI/BeaconWindow.cpp6
-rw-r--r--src/UI/BeaconWindow.h2
-rw-r--r--src/UI/BrewingstandWindow.cpp8
-rw-r--r--src/UI/BrewingstandWindow.h2
-rw-r--r--src/UI/ChestWindow.cpp4
-rw-r--r--src/UI/ChestWindow.h5
-rw-r--r--src/UI/CraftingWindow.cpp6
-rw-r--r--src/UI/CraftingWindow.h5
-rw-r--r--src/UI/DropSpenserWindow.cpp6
-rw-r--r--src/UI/DropSpenserWindow.h2
-rw-r--r--src/UI/EnchantingWindow.cpp8
-rw-r--r--src/UI/EnchantingWindow.h5
-rw-r--r--src/UI/EnderChestWindow.cpp4
-rw-r--r--src/UI/EnderChestWindow.h5
-rw-r--r--src/UI/FurnaceWindow.cpp6
-rw-r--r--src/UI/FurnaceWindow.h2
-rw-r--r--src/UI/HopperWindow.cpp6
-rw-r--r--src/UI/HopperWindow.h5
-rw-r--r--src/UI/InventoryWindow.cpp8
-rw-r--r--src/UI/InventoryWindow.h5
-rw-r--r--src/UI/MinecartWithChestWindow.h9
-rw-r--r--src/UI/SlotArea.cpp32
-rw-r--r--src/UI/SlotArea.h82
-rw-r--r--src/World.cpp4
-rw-r--r--src/World.h18
-rwxr-xr-xsrc/WorldStorage/WSSAnvil.cpp2
-rwxr-xr-xsrc/WorldStorage/WSSAnvil.h4
-rw-r--r--src/WorldStorage/WorldStorage.cpp4
-rw-r--r--src/WorldStorage/WorldStorage.h6
-rw-r--r--src/mbedTLS++/BufferedSslContext.h5
399 files changed, 1814 insertions, 1380 deletions
diff --git a/src/Bindings/LuaChunkStay.cpp b/src/Bindings/LuaChunkStay.cpp
index d885470db..5881c124c 100644
--- a/src/Bindings/LuaChunkStay.cpp
+++ b/src/Bindings/LuaChunkStay.cpp
@@ -101,7 +101,7 @@ void cLuaChunkStay::Enable(cChunkMap & a_ChunkMap, cLuaState::cCallbackPtr a_OnC
m_OnAllChunksAvailable = std::move(a_OnAllChunksAvailable);
// Enable the ChunkStay:
- super::Enable(a_ChunkMap);
+ Super::Enable(a_ChunkMap);
}
diff --git a/src/Bindings/LuaChunkStay.h b/src/Bindings/LuaChunkStay.h
index 765a0b8b7..1f0c0a921 100644
--- a/src/Bindings/LuaChunkStay.h
+++ b/src/Bindings/LuaChunkStay.h
@@ -23,10 +23,10 @@ class cChunkMap;
-class cLuaChunkStay
- : public cChunkStay
+class cLuaChunkStay:
+ public cChunkStay
{
- typedef cChunkStay super;
+ using Super = cChunkStay;
public:
cLuaChunkStay();
diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp
index 5b562eab5..ef042d44d 100644
--- a/src/Bindings/LuaJson.cpp
+++ b/src/Bindings/LuaJson.cpp
@@ -28,7 +28,8 @@ Keeps track of the error message and the problematic value's path in the table.
class CannotSerializeException:
public std::runtime_error
{
- typedef std::runtime_error Super;
+ using Super = std::runtime_error;
+
public:
/** Constructs a new instance of the exception based on the provided values directly. */
explicit CannotSerializeException(const AString & a_ValueName, const char * a_ErrorMsg):
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index e2eacdaf4..bd75d8635 100644
--- a/src/Bindings/LuaState.h
+++ b/src/Bindings/LuaState.h
@@ -285,7 +285,7 @@ public:
class cCallback:
public cTrackedRef
{
- typedef cTrackedRef Super;
+ using Super = cTrackedRef;
public:
@@ -334,7 +334,7 @@ public:
class cOptionalCallback:
public cCallback
{
- typedef cCallback Super;
+ using Super = cCallback;
public:
@@ -369,7 +369,8 @@ public:
class cTableRef:
public cTrackedRef
{
- typedef cTrackedRef Super;
+ using Super = cTrackedRef;
+
public:
cTableRef(void) {}
diff --git a/src/Bindings/LuaWindow.h b/src/Bindings/LuaWindow.h
index 6177b2cbe..eb919fe01 100644
--- a/src/Bindings/LuaWindow.h
+++ b/src/Bindings/LuaWindow.h
@@ -34,7 +34,7 @@ class cLuaWindow :
// tolua_end
, public cItemGrid::cListener
{ // tolua_export
- typedef cWindow Super;
+ using Super = cWindow;
public:
/** Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size.
diff --git a/src/Bindings/ManualBindings.h b/src/Bindings/ManualBindings.h
index 42e34eda2..173f62649 100644
--- a/src/Bindings/ManualBindings.h
+++ b/src/Bindings/ManualBindings.h
@@ -16,6 +16,7 @@
// fwd:
struct tolua_Error;
+class cPluginLua;
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index 52695196b..fac07f00b 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -187,7 +187,7 @@ bool cPluginLua::Load(void)
void cPluginLua::Unload(void)
{
ClearWebTabs();
- super::Unload();
+ Super::Unload();
Close();
}
diff --git a/src/Bindings/PluginLua.h b/src/Bindings/PluginLua.h
index 99e2f22ef..a9e488074 100644
--- a/src/Bindings/PluginLua.h
+++ b/src/Bindings/PluginLua.h
@@ -19,15 +19,15 @@
-
// tolua_begin
-class cPluginLua :
+class cPluginLua:
public cPlugin
{
- typedef cPlugin super;
+ // tolua_end
+
+ using Super = cPlugin;
public:
- // tolua_end
/** A RAII-style mutex lock for accessing the internal LuaState.
This will be the only way to retrieve the plugin's LuaState;
@@ -206,8 +206,4 @@ protected:
}
return false;
}
-} ; // tolua_export
-
-
-
-
+}; // tolua_export
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp
index 00ef145fb..3964d2445 100644
--- a/src/BlockEntities/BeaconEntity.cpp
+++ b/src/BlockEntities/BeaconEntity.cpp
@@ -13,7 +13,7 @@
cBeaconEntity::cBeaconEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, 1, 1, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, 1, 1, a_World),
m_IsActive(false),
m_BeaconLevel(0),
m_PrimaryEffect(cEntityEffect::effNoEffect),
@@ -264,7 +264,7 @@ void cBeaconEntity::GiveEffects(void)
void cBeaconEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cBeaconEntity &>(a_Src);
m_BeaconLevel = src.m_BeaconLevel;
m_Contents.CopyFrom(src.m_Contents);
diff --git a/src/BlockEntities/BeaconEntity.h b/src/BlockEntities/BeaconEntity.h
index a36948820..8403dfa01 100644
--- a/src/BlockEntities/BeaconEntity.h
+++ b/src/BlockEntities/BeaconEntity.h
@@ -16,12 +16,12 @@
// tolua_begin
-class cBeaconEntity :
+class cBeaconEntity:
public cBlockEntityWithItems
{
// tolua_end
- using super = cBlockEntityWithItems;
+ using Super = cBlockEntityWithItems;
public: // tolua_export
diff --git a/src/BlockEntities/BedEntity.cpp b/src/BlockEntities/BedEntity.cpp
index fad2412f0..55fc53b98 100644
--- a/src/BlockEntities/BedEntity.cpp
+++ b/src/BlockEntities/BedEntity.cpp
@@ -14,7 +14,7 @@
cBedEntity::cBedEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World, short a_Color):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Color(a_Color)
{
ASSERT(a_BlockType == E_BLOCK_BED);
@@ -26,7 +26,7 @@ cBedEntity::cBedEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a
void cBedEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cBedEntity &>(a_Src);
m_Color = src.m_Color;
}
diff --git a/src/BlockEntities/BedEntity.h b/src/BlockEntities/BedEntity.h
index 265ed43dd..0a5d25767 100644
--- a/src/BlockEntities/BedEntity.h
+++ b/src/BlockEntities/BedEntity.h
@@ -12,11 +12,11 @@
// tolua_begin
-class cBedEntity :
+class cBedEntity:
public cBlockEntity
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h
index 2617edfb6..3cbceedb7 100644
--- a/src/BlockEntities/BlockEntity.h
+++ b/src/BlockEntities/BlockEntity.h
@@ -10,7 +10,7 @@
#define BLOCKENTITY_PROTODEF(classname) \
virtual bool IsA(const char * a_ClassName) const override \
{ \
- return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
+ return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || Super::IsA(a_ClassName))); \
} \
virtual const char * GetClass() const override \
{ \
@@ -22,7 +22,7 @@
} \
virtual const char * GetParentClass() const override \
{ \
- return super::GetClass(); \
+ return Super::GetClass(); \
}
diff --git a/src/BlockEntities/BlockEntityWithItems.cpp b/src/BlockEntities/BlockEntityWithItems.cpp
index fb21c0e51..8dad08650 100644
--- a/src/BlockEntities/BlockEntityWithItems.cpp
+++ b/src/BlockEntities/BlockEntityWithItems.cpp
@@ -15,7 +15,7 @@ cBlockEntityWithItems::cBlockEntityWithItems(
int a_ItemGridWidth, int a_ItemGridHeight,
cWorld * a_World
):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
cBlockEntityWindowOwner(this),
m_Contents(a_ItemGridWidth, a_ItemGridHeight)
{
@@ -28,7 +28,7 @@ cBlockEntityWithItems::cBlockEntityWithItems(
void cBlockEntityWithItems::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cBlockEntityWithItems &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
}
diff --git a/src/BlockEntities/BlockEntityWithItems.h b/src/BlockEntities/BlockEntityWithItems.h
index ffce3c4f7..2a809bb35 100644
--- a/src/BlockEntities/BlockEntityWithItems.h
+++ b/src/BlockEntities/BlockEntityWithItems.h
@@ -28,7 +28,7 @@ class cBlockEntityWithItems :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/BrewingstandEntity.cpp b/src/BlockEntities/BrewingstandEntity.cpp
index 158dd9278..3f437d4cb 100644
--- a/src/BlockEntities/BrewingstandEntity.cpp
+++ b/src/BlockEntities/BrewingstandEntity.cpp
@@ -12,7 +12,7 @@
cBrewingstandEntity::cBrewingstandEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_IsDestroyed(false),
m_IsBrewing(false),
m_TimeBrewed(0),
@@ -42,7 +42,7 @@ cBrewingstandEntity::~cBrewingstandEntity()
void cBrewingstandEntity::Destroy()
{
m_IsDestroyed = true;
- super::Destroy();
+ Super::Destroy();
}
@@ -51,7 +51,7 @@ void cBrewingstandEntity::Destroy()
void cBrewingstandEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cBrewingstandEntity &>(a_Src);
m_IsBrewing = src.m_IsBrewing;
for (size_t i = 0; i < ARRAYCOUNT(m_CurrentBrewingRecipes); ++i)
@@ -202,7 +202,7 @@ void cBrewingstandEntity::BroadcastProgress(short a_ProgressbarID, short a_Value
void cBrewingstandEntity::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
{
- super::OnSlotChanged(a_ItemGrid, a_SlotNum);
+ Super::OnSlotChanged(a_ItemGrid, a_SlotNum);
if (m_IsDestroyed)
{
diff --git a/src/BlockEntities/BrewingstandEntity.h b/src/BlockEntities/BrewingstandEntity.h
index 791d2a449..44d977966 100644
--- a/src/BlockEntities/BrewingstandEntity.h
+++ b/src/BlockEntities/BrewingstandEntity.h
@@ -20,7 +20,7 @@ class cBrewingstandEntity :
{
// tolua_end
- using super = cBlockEntityWithItems;
+ using Super = cBlockEntityWithItems;
// tolua_begin
diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp
index 902c9b17a..d9648df18 100644
--- a/src/BlockEntities/ChestEntity.cpp
+++ b/src/BlockEntities/ChestEntity.cpp
@@ -14,7 +14,7 @@
cChestEntity::cChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_NumActivePlayers(0),
m_Neighbour(nullptr)
{
@@ -50,7 +50,7 @@ cChestEntity::~cChestEntity()
void cChestEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cChestEntity &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h
index 2e861d48c..2ac0c639b 100644
--- a/src/BlockEntities/ChestEntity.h
+++ b/src/BlockEntities/ChestEntity.h
@@ -20,7 +20,7 @@ class cChestEntity :
{
// tolua_end
- using super = cBlockEntityWithItems;
+ using Super = cBlockEntityWithItems;
// tolua_begin
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp
index a1e4932ba..ad78c4ea3 100644
--- a/src/BlockEntities/CommandBlockEntity.cpp
+++ b/src/BlockEntities/CommandBlockEntity.cpp
@@ -18,7 +18,7 @@
cCommandBlockEntity::cCommandBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_ShouldExecute(false),
m_Result(0)
{
@@ -115,7 +115,7 @@ void cCommandBlockEntity::Activate(void)
void cCommandBlockEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cCommandBlockEntity &>(a_Src);
m_Command = src.m_Command;
m_LastOutput = src.m_LastOutput;
diff --git a/src/BlockEntities/CommandBlockEntity.h b/src/BlockEntities/CommandBlockEntity.h
index bb85e221b..715fe445c 100644
--- a/src/BlockEntities/CommandBlockEntity.h
+++ b/src/BlockEntities/CommandBlockEntity.h
@@ -22,7 +22,7 @@ class cCommandBlockEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp
index 95e3c46b9..90732931f 100644
--- a/src/BlockEntities/DispenserEntity.cpp
+++ b/src/BlockEntities/DispenserEntity.cpp
@@ -14,7 +14,7 @@
cDispenserEntity::cDispenserEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World)
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT(a_BlockType == E_BLOCK_DISPENSER);
}
diff --git a/src/BlockEntities/DispenserEntity.h b/src/BlockEntities/DispenserEntity.h
index 5a2afca30..c123f76cb 100644
--- a/src/BlockEntities/DispenserEntity.h
+++ b/src/BlockEntities/DispenserEntity.h
@@ -13,7 +13,7 @@ class cDispenserEntity :
{
// tolua_end
- using super = cDropSpenserEntity;
+ using Super = cDropSpenserEntity;
public: // tolua_export
diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp
index c301ec24c..869192d09 100644
--- a/src/BlockEntities/DropSpenserEntity.cpp
+++ b/src/BlockEntities/DropSpenserEntity.cpp
@@ -16,7 +16,7 @@
cDropSpenserEntity::cDropSpenserEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_ShouldDropSpense(false)
{
}
@@ -115,7 +115,7 @@ void cDropSpenserEntity::Activate(void)
void cDropSpenserEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cDropSpenserEntity &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
m_ShouldDropSpense = src.m_ShouldDropSpense;
diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h
index 3a2cd0296..475937afe 100644
--- a/src/BlockEntities/DropSpenserEntity.h
+++ b/src/BlockEntities/DropSpenserEntity.h
@@ -28,7 +28,7 @@ class cDropSpenserEntity :
{
// tolua_end
- using super = cBlockEntityWithItems;
+ using Super = cBlockEntityWithItems;
// tolua_begin
diff --git a/src/BlockEntities/DropperEntity.cpp b/src/BlockEntities/DropperEntity.cpp
index 3d45e83d4..341924ebb 100644
--- a/src/BlockEntities/DropperEntity.cpp
+++ b/src/BlockEntities/DropperEntity.cpp
@@ -11,7 +11,7 @@
cDropperEntity::cDropperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World)
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT(a_BlockType == E_BLOCK_DROPPER);
}
diff --git a/src/BlockEntities/DropperEntity.h b/src/BlockEntities/DropperEntity.h
index 722867f6a..3ba2cbbe5 100644
--- a/src/BlockEntities/DropperEntity.h
+++ b/src/BlockEntities/DropperEntity.h
@@ -21,7 +21,7 @@ class cDropperEntity :
{
// tolua_end
- using super = cDropSpenserEntity;
+ using Super = cDropSpenserEntity;
public: // tolua_export
diff --git a/src/BlockEntities/EnderChestEntity.cpp b/src/BlockEntities/EnderChestEntity.cpp
index c324f1cec..74e6a7d23 100644
--- a/src/BlockEntities/EnderChestEntity.cpp
+++ b/src/BlockEntities/EnderChestEntity.cpp
@@ -15,7 +15,7 @@
cEnderChestEntity::cEnderChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
cBlockEntityWindowOwner(this)
{
ASSERT(a_BlockType == E_BLOCK_ENDER_CHEST);
diff --git a/src/BlockEntities/EnderChestEntity.h b/src/BlockEntities/EnderChestEntity.h
index cbedba912..e380d1e3e 100644
--- a/src/BlockEntities/EnderChestEntity.h
+++ b/src/BlockEntities/EnderChestEntity.h
@@ -15,7 +15,7 @@ class cEnderChestEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/FlowerPotEntity.cpp b/src/BlockEntities/FlowerPotEntity.cpp
index bb8d7854d..5446ee5bd 100644
--- a/src/BlockEntities/FlowerPotEntity.cpp
+++ b/src/BlockEntities/FlowerPotEntity.cpp
@@ -14,7 +14,7 @@
cFlowerPotEntity::cFlowerPotEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World)
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT(a_BlockType == E_BLOCK_FLOWER_POT);
}
@@ -43,7 +43,7 @@ void cFlowerPotEntity::Destroy(void)
void cFlowerPotEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cFlowerPotEntity &>(a_Src);
m_Item = src.m_Item;
}
diff --git a/src/BlockEntities/FlowerPotEntity.h b/src/BlockEntities/FlowerPotEntity.h
index 3fa5e7321..5ba4e4ab2 100644
--- a/src/BlockEntities/FlowerPotEntity.h
+++ b/src/BlockEntities/FlowerPotEntity.h
@@ -22,7 +22,7 @@ class cFlowerPotEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/FurnaceEntity.cpp b/src/BlockEntities/FurnaceEntity.cpp
index 38fcf77a4..f521bf666 100644
--- a/src/BlockEntities/FurnaceEntity.cpp
+++ b/src/BlockEntities/FurnaceEntity.cpp
@@ -23,7 +23,7 @@ enum
cFurnaceEntity::cFurnaceEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_CurrentRecipe(nullptr),
m_IsDestroyed(false),
m_IsCooking(a_BlockType == E_BLOCK_LIT_FURNACE),
@@ -58,7 +58,7 @@ cFurnaceEntity::~cFurnaceEntity()
void cFurnaceEntity::Destroy()
{
m_IsDestroyed = true;
- super::Destroy();
+ Super::Destroy();
}
@@ -67,7 +67,7 @@ void cFurnaceEntity::Destroy()
void cFurnaceEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cFurnaceEntity &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
m_CurrentRecipe = src.m_CurrentRecipe;
@@ -255,7 +255,7 @@ void cFurnaceEntity::BurnNewFuel(void)
void cFurnaceEntity::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
{
- super::OnSlotChanged(a_ItemGrid, a_SlotNum);
+ Super::OnSlotChanged(a_ItemGrid, a_SlotNum);
if (m_IsDestroyed)
{
diff --git a/src/BlockEntities/FurnaceEntity.h b/src/BlockEntities/FurnaceEntity.h
index 2d262704f..64b76a9ec 100644
--- a/src/BlockEntities/FurnaceEntity.h
+++ b/src/BlockEntities/FurnaceEntity.h
@@ -20,7 +20,7 @@ class cFurnaceEntity :
{
// tolua_end
- using super = cBlockEntityWithItems;
+ using Super = cBlockEntityWithItems;
// tolua_begin
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index aadca8311..020a041e1 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -18,7 +18,7 @@
cHopperEntity::cHopperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_LastMoveItemsInTick(0),
m_LastMoveItemsOutTick(0),
m_Locked(false)
@@ -63,7 +63,7 @@ std::pair<bool, Vector3i> cHopperEntity::GetOutputBlockPos(NIBBLETYPE a_BlockMet
void cHopperEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cHopperEntity &>(a_Src);
m_LastMoveItemsInTick = src.m_LastMoveItemsInTick;
m_LastMoveItemsOutTick = src.m_LastMoveItemsOutTick;
diff --git a/src/BlockEntities/HopperEntity.h b/src/BlockEntities/HopperEntity.h
index ef86a36bb..ff21471b6 100644
--- a/src/BlockEntities/HopperEntity.h
+++ b/src/BlockEntities/HopperEntity.h
@@ -21,7 +21,7 @@ class cHopperEntity :
{
// tolua_end
- using super = cBlockEntityWithItems;
+ using Super = cBlockEntityWithItems;
// tolua_begin
diff --git a/src/BlockEntities/JukeboxEntity.cpp b/src/BlockEntities/JukeboxEntity.cpp
index 9efd4f0ac..c8d08f327 100644
--- a/src/BlockEntities/JukeboxEntity.cpp
+++ b/src/BlockEntities/JukeboxEntity.cpp
@@ -14,7 +14,7 @@
cJukeboxEntity::cJukeboxEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Record(0)
{
ASSERT(a_BlockType == E_BLOCK_JUKEBOX);
@@ -49,7 +49,7 @@ void cJukeboxEntity::Destroy(void)
void cJukeboxEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cJukeboxEntity &>(a_Src);
m_Record = src.m_Record;
}
diff --git a/src/BlockEntities/JukeboxEntity.h b/src/BlockEntities/JukeboxEntity.h
index 532f8905a..223861149 100644
--- a/src/BlockEntities/JukeboxEntity.h
+++ b/src/BlockEntities/JukeboxEntity.h
@@ -15,7 +15,7 @@ class cJukeboxEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/MobHeadEntity.cpp b/src/BlockEntities/MobHeadEntity.cpp
index fa4920f5c..36402f59f 100644
--- a/src/BlockEntities/MobHeadEntity.cpp
+++ b/src/BlockEntities/MobHeadEntity.cpp
@@ -14,7 +14,7 @@
cMobHeadEntity::cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Type(SKULL_TYPE_SKELETON),
m_Rotation(SKULL_ROTATION_NORTH)
{
@@ -27,7 +27,7 @@ cMobHeadEntity::cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Ve
void cMobHeadEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cMobHeadEntity &>(a_Src);
m_OwnerName = src.m_OwnerName;
m_OwnerTexture = src.m_OwnerTexture;
diff --git a/src/BlockEntities/MobHeadEntity.h b/src/BlockEntities/MobHeadEntity.h
index 847e43f6f..5c41b40d8 100644
--- a/src/BlockEntities/MobHeadEntity.h
+++ b/src/BlockEntities/MobHeadEntity.h
@@ -23,7 +23,7 @@ class cMobHeadEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/MobSpawnerEntity.cpp b/src/BlockEntities/MobSpawnerEntity.cpp
index 76b86f73a..2b099f2c8 100644
--- a/src/BlockEntities/MobSpawnerEntity.cpp
+++ b/src/BlockEntities/MobSpawnerEntity.cpp
@@ -14,7 +14,7 @@
cMobSpawnerEntity::cMobSpawnerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Entity(mtPig),
m_SpawnDelay(100),
m_IsActive(false)
@@ -28,7 +28,7 @@ cMobSpawnerEntity::cMobSpawnerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMe
void cMobSpawnerEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cMobSpawnerEntity &>(a_Src);
m_Entity = src.m_Entity;
m_IsActive = src.m_IsActive;
diff --git a/src/BlockEntities/MobSpawnerEntity.h b/src/BlockEntities/MobSpawnerEntity.h
index 12fa02f51..0d1991e87 100644
--- a/src/BlockEntities/MobSpawnerEntity.h
+++ b/src/BlockEntities/MobSpawnerEntity.h
@@ -21,7 +21,7 @@ class cMobSpawnerEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/NoteEntity.cpp b/src/BlockEntities/NoteEntity.cpp
index bb35e871c..531197a0d 100644
--- a/src/BlockEntities/NoteEntity.cpp
+++ b/src/BlockEntities/NoteEntity.cpp
@@ -10,7 +10,7 @@
cNoteEntity::cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World),
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Pitch(0)
{
ASSERT(a_BlockType == E_BLOCK_NOTE_BLOCK);
@@ -22,7 +22,7 @@ cNoteEntity::cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i
void cNoteEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cNoteEntity &>(a_Src);
m_Pitch = src.m_Pitch;
}
diff --git a/src/BlockEntities/NoteEntity.h b/src/BlockEntities/NoteEntity.h
index ce145a3a9..30dea8811 100644
--- a/src/BlockEntities/NoteEntity.h
+++ b/src/BlockEntities/NoteEntity.h
@@ -32,7 +32,7 @@ class cNoteEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/BlockEntities/SignEntity.cpp b/src/BlockEntities/SignEntity.cpp
index c9ebc7294..30adcb9f9 100644
--- a/src/BlockEntities/SignEntity.cpp
+++ b/src/BlockEntities/SignEntity.cpp
@@ -13,7 +13,7 @@
cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
- super(a_BlockType, a_BlockMeta, a_Pos, a_World)
+ Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT((a_BlockType == E_BLOCK_WALLSIGN) || (a_BlockType == E_BLOCK_SIGN_POST));
ASSERT(cChunkDef::IsValidHeight(a_Pos.y));
@@ -25,7 +25,7 @@ cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i
void cSignEntity::CopyFrom(const cBlockEntity & a_Src)
{
- super::CopyFrom(a_Src);
+ Super::CopyFrom(a_Src);
auto & src = static_cast<const cSignEntity &>(a_Src);
for (size_t i = 0; i < ARRAYCOUNT(m_Line); ++i)
{
diff --git a/src/BlockEntities/SignEntity.h b/src/BlockEntities/SignEntity.h
index 498d9e91e..83eb0352d 100644
--- a/src/BlockEntities/SignEntity.h
+++ b/src/BlockEntities/SignEntity.h
@@ -21,7 +21,7 @@ class cSignEntity :
{
// tolua_end
- using super = cBlockEntity;
+ using Super = cBlockEntity;
public: // tolua_export
diff --git a/src/Blocks/BlockAnvil.h b/src/Blocks/BlockAnvil.h
index da242fdb7..f113f7905 100644
--- a/src/Blocks/BlockAnvil.h
+++ b/src/Blocks/BlockAnvil.h
@@ -10,14 +10,15 @@
-class cBlockAnvilHandler :
+class cBlockAnvilHandler:
public cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>
{
+ using Super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
+
public:
- using super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
- cBlockAnvilHandler(BLOCKTYPE a_BlockType)
- : super(a_BlockType)
+ cBlockAnvilHandler(BLOCKTYPE a_BlockType):
+ Super(a_BlockType)
{
}
@@ -48,7 +49,7 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
- if (!super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta))
+ if (!Super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta))
{
return false;
}
diff --git a/src/Blocks/BlockBed.h b/src/Blocks/BlockBed.h
index ecf1f0d88..6793585b8 100644
--- a/src/Blocks/BlockBed.h
+++ b/src/Blocks/BlockBed.h
@@ -18,12 +18,12 @@ class cWorldInterface;
class cBlockBedHandler :
public cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>
{
- using super = cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>;
+ using Super = cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>;
public:
cBlockBedHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockBigFlower.h b/src/Blocks/BlockBigFlower.h
index 720c8f40a..e7bd9b957 100644
--- a/src/Blocks/BlockBigFlower.h
+++ b/src/Blocks/BlockBigFlower.h
@@ -12,12 +12,12 @@
class cBlockBigFlowerHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockBigFlowerHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockBrewingStand.h b/src/Blocks/BlockBrewingStand.h
index 6f8966e47..b8a8b2dc0 100644
--- a/src/Blocks/BlockBrewingStand.h
+++ b/src/Blocks/BlockBrewingStand.h
@@ -11,12 +11,12 @@
class cBlockBrewingStandHandler :
public cBlockEntityHandler
{
- using super = cBlockEntityHandler;
+ using Super = cBlockEntityHandler;
public:
cBlockBrewingStandHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index 10d3569d0..c09dec56c 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/Blocks/BlockButton.h
@@ -11,12 +11,12 @@
class cBlockButtonHandler :
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>
{
- using super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>;
+ using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>;
public:
cBlockButtonHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockCactus.h b/src/Blocks/BlockCactus.h
index a00f5b6d4..db65ea15f 100644
--- a/src/Blocks/BlockCactus.h
+++ b/src/Blocks/BlockCactus.h
@@ -10,12 +10,12 @@
class cBlockCactusHandler :
public cClearMetaOnDrop<cBlockPlant<false>>
{
- using super = cClearMetaOnDrop<cBlockPlant<false>>;
+ using Super = cClearMetaOnDrop<cBlockPlant<false>>;
public:
cBlockCactusHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -159,7 +159,7 @@ protected:
// Only allow growing if there's an air block above:
if (((a_RelPos.y + 1) < cChunkDef::Height) && (a_Chunk.GetBlock(a_RelPos.addedY(1)) == E_BLOCK_AIR))
{
- return super::CanGrow(a_Chunk, a_RelPos);
+ return Super::CanGrow(a_Chunk, a_RelPos);
}
return paStay;
}
diff --git a/src/Blocks/BlockCake.h b/src/Blocks/BlockCake.h
index 6a80e939c..e30a79db1 100644
--- a/src/Blocks/BlockCake.h
+++ b/src/Blocks/BlockCake.h
@@ -9,10 +9,10 @@
class cBlockCakeHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockCakeHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockCarpet.h b/src/Blocks/BlockCarpet.h
index 2b2ae2434..9f315caa8 100644
--- a/src/Blocks/BlockCarpet.h
+++ b/src/Blocks/BlockCarpet.h
@@ -17,12 +17,12 @@
class cBlockCarpetHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockCarpetHandler(BLOCKTYPE a_BlockType) :
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockCauldron.h b/src/Blocks/BlockCauldron.h
index d6ef721ad..37f274f18 100644
--- a/src/Blocks/BlockCauldron.h
+++ b/src/Blocks/BlockCauldron.h
@@ -10,12 +10,12 @@
class cBlockCauldronHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockCauldronHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockChest.h b/src/Blocks/BlockChest.h
index cd70c95b6..aeb687abb 100644
--- a/src/Blocks/BlockChest.h
+++ b/src/Blocks/BlockChest.h
@@ -13,12 +13,12 @@
class cBlockChestHandler :
public cYawRotator<cContainerEntityHandler<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>
{
- using super = cYawRotator<cContainerEntityHandler<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>;
+ using Super = cYawRotator<cContainerEntityHandler<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>;
public:
cBlockChestHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -48,7 +48,7 @@ public:
}
// Get meta as if this was a single-chest:
- if (!super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta))
+ if (!Super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta))
{
return false;
}
diff --git a/src/Blocks/BlockCocoaPod.h b/src/Blocks/BlockCocoaPod.h
index 415ea4cf1..11190e0ba 100644
--- a/src/Blocks/BlockCocoaPod.h
+++ b/src/Blocks/BlockCocoaPod.h
@@ -10,11 +10,11 @@
class cBlockCocoaPodHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockCocoaPodHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockCommandBlock.h b/src/Blocks/BlockCommandBlock.h
index 70b98baf0..4bd47963c 100644
--- a/src/Blocks/BlockCommandBlock.h
+++ b/src/Blocks/BlockCommandBlock.h
@@ -10,12 +10,12 @@
class cBlockCommandBlockHandler :
public cBlockEntityHandler
{
- using super = cBlockEntityHandler;
+ using Super = cBlockEntityHandler;
public:
cBlockCommandBlockHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockComparator.h b/src/Blocks/BlockComparator.h
index 0826e3133..5e6b3eaa6 100644
--- a/src/Blocks/BlockComparator.h
+++ b/src/Blocks/BlockComparator.h
@@ -12,12 +12,12 @@
class cBlockComparatorHandler :
public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
{
- using super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
+ using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
public:
cBlockComparatorHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockConcretePowder.h b/src/Blocks/BlockConcretePowder.h
index 58dfade99..d3133a571 100644
--- a/src/Blocks/BlockConcretePowder.h
+++ b/src/Blocks/BlockConcretePowder.h
@@ -10,12 +10,12 @@
class cBlockConcretePowderHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockConcretePowderHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -33,7 +33,7 @@ public:
{
return;
}
- super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk);
+ Super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk);
}
diff --git a/src/Blocks/BlockCrops.h b/src/Blocks/BlockCrops.h
index 0dc0ebbb8..4622d1ad5 100644
--- a/src/Blocks/BlockCrops.h
+++ b/src/Blocks/BlockCrops.h
@@ -13,12 +13,12 @@ template <NIBBLETYPE RipeMeta>
class cBlockCropsHandler:
public cBlockPlant<true>
{
- using super = cBlockPlant<true>;
+ using Super = cBlockPlant<true>;
public:
cBlockCropsHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockDeadBush.h b/src/Blocks/BlockDeadBush.h
index 0b7d27e8b..52c9ac594 100644
--- a/src/Blocks/BlockDeadBush.h
+++ b/src/Blocks/BlockDeadBush.h
@@ -7,21 +7,30 @@
-class cBlockDeadBushHandler :
+class cBlockDeadBushHandler:
public cBlockHandler
{
- typedef cBlockHandler super;
+ using Super = cBlockHandler;
+
public:
- cBlockDeadBushHandler(BLOCKTYPE a_BlockType)
- : cBlockHandler(a_BlockType)
+ cBlockDeadBushHandler(BLOCKTYPE a_BlockType):
+ Super(a_BlockType)
{
}
+
+
+
+
virtual bool DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta) override
{
return true;
}
+
+
+
+
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
if (a_RelY <= 0)
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index 9a6c6104b..24c726149 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -10,12 +10,12 @@
class cBlockDirtHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockDirtHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockDoor.cpp b/src/Blocks/BlockDoor.cpp
index d9a4f12ec..bb694e5b2 100644
--- a/src/Blocks/BlockDoor.cpp
+++ b/src/Blocks/BlockDoor.cpp
@@ -8,7 +8,7 @@
cBlockDoorHandler::cBlockDoorHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -123,7 +123,7 @@ NIBBLETYPE cBlockDoorHandler::MetaRotateCCW(NIBBLETYPE a_Meta)
else
{
// Rotate the bottom block
- return super::MetaRotateCCW(a_Meta);
+ return Super::MetaRotateCCW(a_Meta);
}
}
@@ -141,7 +141,7 @@ NIBBLETYPE cBlockDoorHandler::MetaRotateCW(NIBBLETYPE a_Meta)
else
{
// Rotate the bottom block
- return super::MetaRotateCW(a_Meta);
+ return Super::MetaRotateCW(a_Meta);
}
}
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h
index be589ed29..48c761d05 100644
--- a/src/Blocks/BlockDoor.h
+++ b/src/Blocks/BlockDoor.h
@@ -14,7 +14,7 @@
class cBlockDoorHandler :
public cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>
{
- using super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
+ using Super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
public:
@@ -50,7 +50,7 @@ public:
return false;
}
- return super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta);
+ return Super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta);
}
virtual cBoundingBox GetPlacementCollisionBox(BLOCKTYPE a_XM, BLOCKTYPE a_XP, BLOCKTYPE a_YM, BLOCKTYPE a_YP, BLOCKTYPE a_ZM, BLOCKTYPE a_ZP) override;
diff --git a/src/Blocks/BlockDropSpenser.h b/src/Blocks/BlockDropSpenser.h
index 2cade1210..90ed1b7d7 100644
--- a/src/Blocks/BlockDropSpenser.h
+++ b/src/Blocks/BlockDropSpenser.h
@@ -16,12 +16,12 @@
class cBlockDropSpenserHandler :
public cPitchYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>
{
- using super = cPitchYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>;
+ using Super = cPitchYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>;
public:
cBlockDropSpenserHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockEnderchest.h b/src/Blocks/BlockEnderchest.h
index f3df6da28..8e96bec95 100644
--- a/src/Blocks/BlockEnderchest.h
+++ b/src/Blocks/BlockEnderchest.h
@@ -10,12 +10,12 @@
class cBlockEnderchestHandler :
public cYawRotator<cBlockEntityHandler>
{
- using super = cYawRotator<cBlockEntityHandler>;
+ using Super = cYawRotator<cBlockEntityHandler>;
public:
cBlockEnderchestHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockEntity.h b/src/Blocks/BlockEntity.h
index f592dbd83..8e7f92913 100644
--- a/src/Blocks/BlockEntity.h
+++ b/src/Blocks/BlockEntity.h
@@ -15,12 +15,12 @@ Forwards the "use" event to the block entity. */
class cBlockEntityHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockEntityHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockFarmland.h b/src/Blocks/BlockFarmland.h
index 261103a50..20898b5e3 100644
--- a/src/Blocks/BlockFarmland.h
+++ b/src/Blocks/BlockFarmland.h
@@ -19,12 +19,12 @@
class cBlockFarmlandHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockFarmlandHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockFenceGate.h b/src/Blocks/BlockFenceGate.h
index 5646c51b2..5d89ae021 100644
--- a/src/Blocks/BlockFenceGate.h
+++ b/src/Blocks/BlockFenceGate.h
@@ -11,12 +11,12 @@
class cBlockFenceGateHandler :
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>
{
- using super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>;
+ using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>;
public:
cBlockFenceGateHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockFlowerPot.h b/src/Blocks/BlockFlowerPot.h
index b552e2c81..6d64eb5f8 100644
--- a/src/Blocks/BlockFlowerPot.h
+++ b/src/Blocks/BlockFlowerPot.h
@@ -10,12 +10,12 @@
class cBlockFlowerPotHandler :
public cBlockEntityHandler
{
- using super = cBlockEntityHandler;
+ using Super = cBlockEntityHandler;
public:
cBlockFlowerPotHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockFluid.h b/src/Blocks/BlockFluid.h
index 430940df0..36f363a92 100644
--- a/src/Blocks/BlockFluid.h
+++ b/src/Blocks/BlockFluid.h
@@ -7,14 +7,15 @@
-class cBlockFluidHandler :
+class cBlockFluidHandler:
public cBlockHandler
{
- typedef cBlockHandler super;
+ using Super = cBlockHandler;
public:
- cBlockFluidHandler(BLOCKTYPE a_BlockType)
- : cBlockHandler(a_BlockType)
+
+ cBlockFluidHandler(BLOCKTYPE a_BlockType):
+ Super(a_BlockType)
{
}
@@ -61,7 +62,7 @@ public:
break;
}
}
- super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk);
+ Super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk);
}
@@ -96,14 +97,15 @@ public:
-class cBlockLavaHandler :
+class cBlockLavaHandler:
public cBlockFluidHandler
{
- typedef cBlockFluidHandler super;
+ using Super = cBlockFluidHandler;
+
public:
- cBlockLavaHandler(BLOCKTYPE a_BlockType) :
- super(a_BlockType)
+ cBlockLavaHandler(BLOCKTYPE a_BlockType):
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockFurnace.h b/src/Blocks/BlockFurnace.h
index c4044a0b2..b4efb6638 100644
--- a/src/Blocks/BlockFurnace.h
+++ b/src/Blocks/BlockFurnace.h
@@ -11,12 +11,12 @@
class cBlockFurnaceHandler :
public cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>
{
- using super = cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>;
+ using Super = cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>;
public:
cBlockFurnaceHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockHopper.h b/src/Blocks/BlockHopper.h
index 0c6724d76..a8d59440d 100644
--- a/src/Blocks/BlockHopper.h
+++ b/src/Blocks/BlockHopper.h
@@ -10,12 +10,12 @@
class cBlockHopperHandler :
public cPitchYawRotator<cContainerEntityHandler<cBlockEntityHandler>>
{
- using super = cPitchYawRotator<cContainerEntityHandler<cBlockEntityHandler>>;
+ using Super = cPitchYawRotator<cContainerEntityHandler<cBlockEntityHandler>>;
public:
cBlockHopperHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockIce.h b/src/Blocks/BlockIce.h
index a39162d79..5e2fd9dbb 100644
--- a/src/Blocks/BlockIce.h
+++ b/src/Blocks/BlockIce.h
@@ -10,12 +10,12 @@
class cBlockIceHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockIceHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h
index 90e2d8304..c141faeb4 100644
--- a/src/Blocks/BlockLadder.h
+++ b/src/Blocks/BlockLadder.h
@@ -11,12 +11,12 @@
class cBlockLadderHandler :
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >
{
- using super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>>;
+ using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>>;
public:
cBlockLadderHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index e4b181a24..8425b6620 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -9,12 +9,12 @@
class cBlockLeverHandler :
public cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>
{
- using super = cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>;
+ using Super = cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>;
public:
cBlockLeverHandler(BLOCKTYPE a_BlockType) :
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -164,7 +164,7 @@ public:
case 0x05: return 0x06; // Ground rotation
case 0x06: return 0x05;
- default: return super::MetaRotateCCW(a_Meta); // Wall Rotation
+ default: return Super::MetaRotateCCW(a_Meta); // Wall Rotation
}
}
@@ -182,7 +182,7 @@ public:
case 0x05: return 0x06; // Ground rotation
case 0x06: return 0x05;
- default: return super::MetaRotateCW(a_Meta); // Wall Rotation
+ default: return Super::MetaRotateCW(a_Meta); // Wall Rotation
}
}
diff --git a/src/Blocks/BlockLilypad.h b/src/Blocks/BlockLilypad.h
index 9c4edaecc..c51eb0a3d 100644
--- a/src/Blocks/BlockLilypad.h
+++ b/src/Blocks/BlockLilypad.h
@@ -7,14 +7,15 @@
-class cBlockLilypadHandler :
+class cBlockLilypadHandler:
public cClearMetaOnDrop<cBlockHandler>
{
- typedef cClearMetaOnDrop<cBlockHandler> super;
+ using Super = cClearMetaOnDrop<cBlockHandler>;
+
public:
- cBlockLilypadHandler(BLOCKTYPE a_BlockType) :
- super(a_BlockType)
+ cBlockLilypadHandler(BLOCKTYPE a_BlockType):
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockMelon.h b/src/Blocks/BlockMelon.h
index 3a25a0e2d..d6b9e6a46 100644
--- a/src/Blocks/BlockMelon.h
+++ b/src/Blocks/BlockMelon.h
@@ -10,12 +10,12 @@
class cBlockMelonHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockMelonHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockMobHead.h b/src/Blocks/BlockMobHead.h
index cdee5c297..2fc8b177d 100644
--- a/src/Blocks/BlockMobHead.h
+++ b/src/Blocks/BlockMobHead.h
@@ -11,11 +11,11 @@
class cBlockMobHeadHandler :
public cBlockEntityHandler
{
- using super = cBlockEntityHandler;
+ using Super = cBlockEntityHandler;
public:
cBlockMobHeadHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockMushroom.h b/src/Blocks/BlockMushroom.h
index 7fb397420..f44fbdc07 100644
--- a/src/Blocks/BlockMushroom.h
+++ b/src/Blocks/BlockMushroom.h
@@ -10,12 +10,12 @@
class cBlockMushroomHandler:
public cClearMetaOnDrop<cBlockHandler>
{
- using super = cClearMetaOnDrop<cBlockHandler>;
+ using Super = cClearMetaOnDrop<cBlockHandler>;
public:
cBlockMushroomHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockNetherWart.h b/src/Blocks/BlockNetherWart.h
index 5664093e9..40ab1d886 100644
--- a/src/Blocks/BlockNetherWart.h
+++ b/src/Blocks/BlockNetherWart.h
@@ -11,12 +11,12 @@
class cBlockNetherWartHandler :
public cBlockPlant<false>
{
- using super = cBlockPlant<false>;
+ using Super = cBlockPlant<false>;
public:
cBlockNetherWartHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockObserver.h b/src/Blocks/BlockObserver.h
index ebac0ee31..30c19ba2e 100644
--- a/src/Blocks/BlockObserver.h
+++ b/src/Blocks/BlockObserver.h
@@ -8,11 +8,11 @@
class cBlockObserverHandler:
public cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>
{
- using super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>;
+ using Super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>;
public:
- cBlockObserverHandler(BLOCKTYPE a_BlockType) : super(a_BlockType)
+ cBlockObserverHandler(BLOCKTYPE a_BlockType) : Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockOre.h b/src/Blocks/BlockOre.h
index 70bb0515d..6200b09f4 100644
--- a/src/Blocks/BlockOre.h
+++ b/src/Blocks/BlockOre.h
@@ -7,13 +7,14 @@
-class cBlockOreHandler :
+class cBlockOreHandler:
public cBlockHandler
{
- typedef cBlockHandler super;
+ using Super = cBlockHandler;
+
public:
- cBlockOreHandler(BLOCKTYPE a_BlockType)
- : cBlockHandler(a_BlockType)
+ cBlockOreHandler(BLOCKTYPE a_BlockType):
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 26c078e5c..e68e05809 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -18,7 +18,7 @@
cBlockPistonHandler::cBlockPistonHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -320,7 +320,7 @@ void cBlockPistonHandler::RetractPiston(Vector3i a_BlockPos, cWorld & a_World)
// cBlockPistonHeadHandler:
cBlockPistonHeadHandler::cBlockPistonHeadHandler(void) :
- super(E_BLOCK_PISTON_EXTENSION)
+ Super(E_BLOCK_PISTON_EXTENSION)
{
}
diff --git a/src/Blocks/BlockPiston.h b/src/Blocks/BlockPiston.h
index 53a3537a2..2cc872097 100644
--- a/src/Blocks/BlockPiston.h
+++ b/src/Blocks/BlockPiston.h
@@ -19,7 +19,7 @@ class cWorld;
class cBlockPistonHandler:
public cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>
{
- using super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>;
+ using Super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>;
public:
@@ -145,7 +145,7 @@ private:
class cBlockPistonHeadHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockPistonHeadHandler(void);
diff --git a/src/Blocks/BlockPlant.h b/src/Blocks/BlockPlant.h
index 0e249bbde..589619b26 100644
--- a/src/Blocks/BlockPlant.h
+++ b/src/Blocks/BlockPlant.h
@@ -12,13 +12,13 @@ template <bool NeedsLightToGrow>
class cBlockPlant:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockPlant(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockPressurePlate.h b/src/Blocks/BlockPressurePlate.h
index 7067bd2e5..bac93675e 100644
--- a/src/Blocks/BlockPressurePlate.h
+++ b/src/Blocks/BlockPressurePlate.h
@@ -9,12 +9,12 @@
class cBlockPressurePlateHandler :
public cClearMetaOnDrop<cBlockHandler>
{
- using super = cClearMetaOnDrop<cBlockHandler>;
+ using Super = cClearMetaOnDrop<cBlockHandler>;
public:
cBlockPressurePlateHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockPumpkin.h b/src/Blocks/BlockPumpkin.h
index 150d305e1..81ba080be 100644
--- a/src/Blocks/BlockPumpkin.h
+++ b/src/Blocks/BlockPumpkin.h
@@ -8,11 +8,11 @@
class cBlockPumpkinHandler :
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>
{
- using super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
+ using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
public:
cBlockPumpkinHandler(BLOCKTYPE a_BlockType) :
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockRail.h b/src/Blocks/BlockRail.h
index 6b9ddcdd5..7ee98d576 100644
--- a/src/Blocks/BlockRail.h
+++ b/src/Blocks/BlockRail.h
@@ -19,12 +19,12 @@ enum ENUM_PURE
class cBlockRailHandler :
public cClearMetaOnDrop<cBlockHandler>
{
- using super = cClearMetaOnDrop<cBlockHandler>;
+ using Super = cClearMetaOnDrop<cBlockHandler>;
public:
cBlockRailHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -57,7 +57,7 @@ public:
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
) override
{
- super::OnPlaced(a_ChunkInterface, a_WorldInterface, a_BlockPos, a_BlockType, a_BlockMeta);
+ Super::OnPlaced(a_ChunkInterface, a_WorldInterface, a_BlockPos, a_BlockType, a_BlockMeta);
// Alert diagonal rails:
NeighborChanged(a_ChunkInterface, a_BlockPos + Vector3i( 1, 1, 0), BLOCK_FACE_NONE);
@@ -80,7 +80,7 @@ public:
BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta
) override
{
- super::OnBroken(a_ChunkInterface, a_WorldInterface, a_BlockPos, a_OldBlockType, a_OldBlockMeta);
+ Super::OnBroken(a_ChunkInterface, a_WorldInterface, a_BlockPos, a_OldBlockType, a_OldBlockMeta);
// Alert diagonal rails:
NeighborChanged(a_ChunkInterface, a_BlockPos + Vector3i( 1, 1, 0), BLOCK_FACE_NONE);
diff --git a/src/Blocks/BlockRedstone.h b/src/Blocks/BlockRedstone.h
index c93537d08..14621948e 100644
--- a/src/Blocks/BlockRedstone.h
+++ b/src/Blocks/BlockRedstone.h
@@ -11,12 +11,12 @@
class cBlockRedstoneHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockRedstoneHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h
index 1fea6e38b..89cba2d35 100644
--- a/src/Blocks/BlockRedstoneRepeater.h
+++ b/src/Blocks/BlockRedstoneRepeater.h
@@ -14,12 +14,12 @@
class cBlockRedstoneRepeaterHandler:
public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
{
- using super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
+ using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
public:
cBlockRedstoneRepeaterHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockRedstoneTorch.h b/src/Blocks/BlockRedstoneTorch.h
index 3f065b1cb..22a3cf52d 100644
--- a/src/Blocks/BlockRedstoneTorch.h
+++ b/src/Blocks/BlockRedstoneTorch.h
@@ -10,12 +10,12 @@
class cBlockRedstoneTorchHandler :
public cBlockTorchHandler
{
- using super = cBlockTorchHandler;
+ using Super = cBlockTorchHandler;
public:
cBlockRedstoneTorchHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSapling.h b/src/Blocks/BlockSapling.h
index 15bd57f6a..b66587288 100644
--- a/src/Blocks/BlockSapling.h
+++ b/src/Blocks/BlockSapling.h
@@ -11,12 +11,12 @@
class cBlockSaplingHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockSaplingHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSeaLantern.h b/src/Blocks/BlockSeaLantern.h
index 0d7c62b94..5ec671f07 100644
--- a/src/Blocks/BlockSeaLantern.h
+++ b/src/Blocks/BlockSeaLantern.h
@@ -10,12 +10,12 @@
class cBlockSeaLanternHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockSeaLanternHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSideways.h b/src/Blocks/BlockSideways.h
index 017dc30e0..5854f334c 100644
--- a/src/Blocks/BlockSideways.h
+++ b/src/Blocks/BlockSideways.h
@@ -13,12 +13,12 @@ Additionally supports the metadata specifying block sub-type in its lower 2 bits
class cBlockSidewaysHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockSidewaysHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSignPost.h b/src/Blocks/BlockSignPost.h
index b5ccfe5d7..45fa7cad4 100644
--- a/src/Blocks/BlockSignPost.h
+++ b/src/Blocks/BlockSignPost.h
@@ -11,12 +11,12 @@
class cBlockSignPostHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockSignPostHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index ef58c243c..bd9c0299a 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -20,12 +20,12 @@
class cBlockSlabHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockSlabHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -239,12 +239,12 @@ public:
class cBlockDoubleSlabHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockDoubleSlabHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSponge.h b/src/Blocks/BlockSponge.h
index 41102f148..88981567a 100644
--- a/src/Blocks/BlockSponge.h
+++ b/src/Blocks/BlockSponge.h
@@ -10,12 +10,12 @@
class cBlockSpongeHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockSpongeHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -33,7 +33,7 @@ public:
{
return;
}
- super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk);
+ Super::Check(a_ChunkInterface, a_PluginInterface, a_RelPos, a_Chunk);
}
diff --git a/src/Blocks/BlockStairs.h b/src/Blocks/BlockStairs.h
index 4263a5b13..c9e36d535 100644
--- a/src/Blocks/BlockStairs.h
+++ b/src/Blocks/BlockStairs.h
@@ -10,12 +10,12 @@
class cBlockStairsHandler :
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>
{
- using super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>;
+ using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>;
public:
cBlockStairsHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockStems.h b/src/Blocks/BlockStems.h
index 202d71b19..bf0d7ce41 100644
--- a/src/Blocks/BlockStems.h
+++ b/src/Blocks/BlockStems.h
@@ -14,12 +14,12 @@ template <BLOCKTYPE ProduceBlockType, ENUM_ITEM_TYPE StemPickupType>
class cBlockStemsHandler:
public cBlockPlant<true>
{
- using super = cBlockPlant<true>;
+ using Super = cBlockPlant<true>;
public:
cBlockStemsHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h
index f691d4452..9da61c263 100644
--- a/src/Blocks/BlockStone.h
+++ b/src/Blocks/BlockStone.h
@@ -9,12 +9,12 @@
class cBlockStoneHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockStoneHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockSugarcane.h b/src/Blocks/BlockSugarcane.h
index 3c929e37d..f45b312a8 100644
--- a/src/Blocks/BlockSugarcane.h
+++ b/src/Blocks/BlockSugarcane.h
@@ -10,12 +10,12 @@
class cBlockSugarcaneHandler :
public cBlockPlant<false>
{
- using super = cBlockPlant<false>;
+ using Super = cBlockPlant<false>;
public:
cBlockSugarcaneHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
@@ -144,7 +144,7 @@ protected:
// Only allow growing if there's an air block above:
if (((a_RelPos.y + 1) < cChunkDef::Height) && (a_Chunk.GetBlock(a_RelPos.addedY(1)) == E_BLOCK_AIR))
{
- return super::CanGrow(a_Chunk, a_RelPos);
+ return Super::CanGrow(a_Chunk, a_RelPos);
}
return paStay;
}
diff --git a/src/Blocks/BlockTallGrass.h b/src/Blocks/BlockTallGrass.h
index f02c20523..d09e9d496 100644
--- a/src/Blocks/BlockTallGrass.h
+++ b/src/Blocks/BlockTallGrass.h
@@ -12,12 +12,12 @@
class cBlockTallGrassHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockTallGrassHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index c5b06b18a..93ca5e40d 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -11,12 +11,12 @@
class cBlockTorchHandler :
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>
{
- using super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>;
+ using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>;
public:
cBlockTorchHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockTrapdoor.h b/src/Blocks/BlockTrapdoor.h
index 3a768376a..0ad2c64f5 100644
--- a/src/Blocks/BlockTrapdoor.h
+++ b/src/Blocks/BlockTrapdoor.h
@@ -11,12 +11,12 @@
class cBlockTrapdoorHandler :
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>
{
- using super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>;
+ using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>;
public:
cBlockTrapdoorHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockTripwire.h b/src/Blocks/BlockTripwire.h
index dbf21e318..f2fe31a96 100644
--- a/src/Blocks/BlockTripwire.h
+++ b/src/Blocks/BlockTripwire.h
@@ -10,12 +10,12 @@
class cBlockTripwireHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockTripwireHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockTripwireHook.h b/src/Blocks/BlockTripwireHook.h
index 8537f99ce..797034ea0 100644
--- a/src/Blocks/BlockTripwireHook.h
+++ b/src/Blocks/BlockTripwireHook.h
@@ -10,12 +10,12 @@
class cBlockTripwireHookHandler :
public cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>
{
- using super = cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>;
+ using Super = cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>;
public:
cBlockTripwireHookHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h
index 53224a5db..9c3c1c53e 100644
--- a/src/Blocks/BlockVine.h
+++ b/src/Blocks/BlockVine.h
@@ -9,12 +9,12 @@
class cBlockVineHandler :
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockVineHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index 3759b4db6..551107d88 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -11,12 +11,12 @@
class cBlockWallSignHandler:
public cBlockHandler
{
- using super = cBlockHandler;
+ using Super = cBlockHandler;
public:
cBlockWallSignHandler(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{
}
diff --git a/src/Blocks/Mixins.h b/src/Blocks/Mixins.h
index 1ee2876d3..cddbb4850 100644
--- a/src/Blocks/Mixins.h
+++ b/src/Blocks/Mixins.h
@@ -184,11 +184,11 @@ template <
class cYawRotator:
public cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>
{
- using super = cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>;
+ using Super = cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>;
public:
cYawRotator(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{}
@@ -203,7 +203,7 @@ public:
) override
{
NIBBLETYPE BaseMeta;
- if (!super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta))
+ if (!Super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta))
{
return false;
}
@@ -258,11 +258,11 @@ template <
class cPitchYawRotator:
public cYawRotator<Base, BitMask, North, East, South, West>
{
- using super = cYawRotator<Base, BitMask, North, East, South, West>;
+ using Super = cYawRotator<Base, BitMask, North, East, South, West>;
public:
cPitchYawRotator(BLOCKTYPE a_BlockType):
- super(a_BlockType)
+ Super(a_BlockType)
{}
@@ -277,7 +277,7 @@ public:
) override
{
NIBBLETYPE BaseMeta;
- if (!super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta))
+ if (!Super::GetPlacementBlockTypeMeta(a_ChunkInterface, a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, BaseMeta))
{
return false;
}
@@ -319,6 +319,6 @@ public:
return Down;
}
- return super::YawToMetaData(a_Rotation);
+ return Super::YawToMetaData(a_Rotation);
}
};
diff --git a/src/ChunkSender.cpp b/src/ChunkSender.cpp
index 6312dfdea..ee079e430 100644
--- a/src/ChunkSender.cpp
+++ b/src/ChunkSender.cpp
@@ -60,7 +60,7 @@ public:
// cChunkSender:
cChunkSender::cChunkSender(cWorld & a_World) :
- super("ChunkSender"),
+ Super("ChunkSender"),
m_World(a_World)
{
}
@@ -82,7 +82,7 @@ void cChunkSender::Stop(void)
{
m_ShouldTerminate = true;
m_evtQueue.Set();
- super::Stop();
+ Super::Stop();
}
diff --git a/src/ChunkSender.h b/src/ChunkSender.h
index 018beb60e..bac09dd8b 100644
--- a/src/ChunkSender.h
+++ b/src/ChunkSender.h
@@ -53,8 +53,10 @@ class cChunkSender:
public cIsThread,
public cChunkDataCopyCollector
{
- typedef cIsThread super;
+ using Super = cIsThread;
+
public:
+
cChunkSender(cWorld & a_World);
virtual ~cChunkSender() override;
diff --git a/src/CommandOutput.h b/src/CommandOutput.h
index 033a3cbaa..2aad75b09 100644
--- a/src/CommandOutput.h
+++ b/src/CommandOutput.h
@@ -50,9 +50,10 @@ class cNullCommandOutputCallback :
class cStringAccumCommandOutputCallback:
public cCommandOutputCallback
{
- typedef cCommandOutputCallback super;
+ using Super = cCommandOutputCallback;
public:
+
// cCommandOutputCallback overrides:
virtual void Out(const AString & a_Text) override;
virtual void Finished(void) override {}
@@ -83,14 +84,14 @@ public:
/** Sends all command output to a log, line by line; deletes self when command finishes processing */
-class cLogCommandDeleteSelfOutputCallback :
+class cLogCommandDeleteSelfOutputCallback:
public cLogCommandOutputCallback
{
- typedef cLogCommandOutputCallback super;
+ using Super = cLogCommandOutputCallback;
virtual void Finished(void) override
{
- super::Finished();
+ Super::Finished();
delete this;
}
} ;
diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp
index 621c871c8..e5f4d83e6 100644
--- a/src/CompositeChat.cpp
+++ b/src/CompositeChat.cpp
@@ -517,7 +517,7 @@ cCompositeChat::cBasePart::cBasePart(cCompositeChat::ePartType a_PartType, const
// cCompositeChat::cTextPart:
cCompositeChat::cTextPart::cTextPart(const AString & a_Text, const AString &a_Style) :
- super(ptText, a_Text, a_Style)
+ Super(ptText, a_Text, a_Style)
{
}
@@ -529,7 +529,7 @@ cCompositeChat::cTextPart::cTextPart(const AString & a_Text, const AString &a_St
// cCompositeChat::cClientTranslatedPart:
cCompositeChat::cClientTranslatedPart::cClientTranslatedPart(const AString & a_TranslationID, const AStringVector & a_Parameters, const AString & a_Style) :
- super(ptClientTranslated, a_TranslationID, a_Style),
+ Super(ptClientTranslated, a_TranslationID, a_Style),
m_Parameters(a_Parameters)
{
}
@@ -542,7 +542,7 @@ cCompositeChat::cClientTranslatedPart::cClientTranslatedPart(const AString & a_T
// cCompositeChat::cUrlPart:
cCompositeChat::cUrlPart::cUrlPart(const AString & a_Text, const AString & a_Url, const AString & a_Style) :
- super(ptUrl, a_Text, a_Style),
+ Super(ptUrl, a_Text, a_Style),
m_Url(a_Url)
{
}
@@ -555,7 +555,7 @@ cCompositeChat::cUrlPart::cUrlPart(const AString & a_Text, const AString & a_Url
// cCompositeChat::cCommandPart:
cCompositeChat::cCommandPart::cCommandPart(ePartType a_PartType, const AString & a_Text, const AString & a_Command, const AString & a_Style) :
- super(a_PartType, a_Text, a_Style),
+ Super(a_PartType, a_Text, a_Style),
m_Command(a_Command)
{
}
@@ -568,7 +568,7 @@ cCompositeChat::cCommandPart::cCommandPart(ePartType a_PartType, const AString &
// cCompositeChat::cRunCommandPart:
cCompositeChat::cRunCommandPart::cRunCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style) :
- super(ptRunCommand, a_Text, a_Command, a_Style)
+ Super(ptRunCommand, a_Text, a_Command, a_Style)
{
}
@@ -579,7 +579,7 @@ cCompositeChat::cRunCommandPart::cRunCommandPart(const AString & a_Text, const A
// cCompositeChat::cSuggestCommandPart:
cCompositeChat::cSuggestCommandPart::cSuggestCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style) :
- super(ptSuggestCommand, a_Text, a_Command, a_Style)
+ Super(ptSuggestCommand, a_Text, a_Command, a_Style)
{
}
@@ -591,7 +591,7 @@ cCompositeChat::cSuggestCommandPart::cSuggestCommandPart(const AString & a_Text,
// cCompositeChat::cShowAchievementPart:
cCompositeChat::cShowAchievementPart::cShowAchievementPart(const AString & a_PlayerName, const AString & a_Achievement, const AString & a_Style) :
- super(ptShowAchievement, a_Achievement, a_Style),
+ Super(ptShowAchievement, a_Achievement, a_Style),
m_PlayerName(a_PlayerName)
{
}
diff --git a/src/CompositeChat.h b/src/CompositeChat.h
index ab16e9f72..a715d0402 100644
--- a/src/CompositeChat.h
+++ b/src/CompositeChat.h
@@ -43,6 +43,8 @@ public:
ptShowAchievement,
} ;
+
+
class cBasePart
{
public:
@@ -57,70 +59,101 @@ public:
virtual ~cBasePart() {}
} ;
- class cTextPart :
+
+
+ class cTextPart:
public cBasePart
{
- typedef cBasePart super;
+ using Super = cBasePart;
+
public:
+
cTextPart(const AString & a_Text, const AString & a_Style = "");
} ;
- class cClientTranslatedPart :
+
+
+ class cClientTranslatedPart:
public cBasePart
{
- typedef cBasePart super;
+ using Super = cBasePart;
+
public:
+
AStringVector m_Parameters;
cClientTranslatedPart(const AString & a_TranslationID, const AStringVector & a_Parameters, const AString & a_Style = "");
} ;
- class cUrlPart :
+
+
+ class cUrlPart:
public cBasePart
{
- typedef cBasePart super;
+ using Super = cBasePart;
+
public:
+
AString m_Url;
cUrlPart(const AString & a_Text, const AString & a_Url, const AString & a_Style = "");
} ;
- class cCommandPart :
+
+
+ class cCommandPart:
public cBasePart
{
- typedef cBasePart super;
+ using Super = cBasePart;
+
public:
+
AString m_Command;
cCommandPart(ePartType a_PartType, const AString & a_Text, const AString & a_Command, const AString & a_Style = "");
} ;
- class cRunCommandPart :
+
+
+ class cRunCommandPart:
public cCommandPart
{
- typedef cCommandPart super;
+ using Super = cCommandPart;
+
public:
+
cRunCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style = "");
} ;
- class cSuggestCommandPart :
+
+
+ class cSuggestCommandPart:
public cCommandPart
{
- typedef cCommandPart super;
+ using Super = cCommandPart;
+
public:
+
cSuggestCommandPart(const AString & a_Text, const AString & a_Command, const AString & a_Style = "");
} ;
- class cShowAchievementPart :
+
+
+ class cShowAchievementPart:
public cBasePart
{
- typedef cBasePart super;
+ using Super = cBasePart;
+
public:
+
AString m_PlayerName;
cShowAchievementPart(const AString & a_PlayerName, const AString & a_Achievement, const AString & a_Style = "");
} ;
- typedef std::vector<cBasePart *> cParts;
+
+
+ using cParts = std::vector<cBasePart *>;
+
/** Creates a new empty chat message.
Exported manually due to the other overload needing a manual export. */
diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp
index 411d452f6..ac4cabd74 100644
--- a/src/DeadlockDetect.cpp
+++ b/src/DeadlockDetect.cpp
@@ -21,7 +21,7 @@ const int CYCLE_MILLISECONDS = 100;
cDeadlockDetect::cDeadlockDetect(void) :
- super("DeadlockDetect"),
+ Super("DeadlockDetect"),
m_IntervalSec(1000)
{
}
@@ -62,7 +62,7 @@ bool cDeadlockDetect::Start(int a_IntervalSec)
return false;
}
);
- return super::Start();
+ return Super::Start();
}
diff --git a/src/DeadlockDetect.h b/src/DeadlockDetect.h
index db77fa169..15d8a3027 100644
--- a/src/DeadlockDetect.h
+++ b/src/DeadlockDetect.h
@@ -5,7 +5,7 @@
/*
This class simply monitors each world's m_WorldAge, which is expected to grow on each tick.
-If the world age doesn't grow for several seconds, it's either because the server is super-overloaded,
+If the world age doesn't grow for several seconds, it's either because the server is Super-overloaded,
or because the world tick thread hangs in a deadlock. We presume the latter and therefore kill the server.
Once we learn to write crashdumps programmatically, we should do so just before killing, to enable debugging.
*/
@@ -20,13 +20,14 @@ Once we learn to write crashdumps programmatically, we should do so just before
-class cDeadlockDetect :
+class cDeadlockDetect:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
public:
- cDeadlockDetect(void);
+
+ cDeadlockDetect();
virtual ~cDeadlockDetect() override;
/** Starts the detection. Hides cIsThread's Start, because we need some initialization */
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 428721a80..38dfb8392 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -9,7 +9,7 @@
cArrowEntity::cArrowEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkArrow, a_Creator, a_Pos, 0.5, 0.5),
+ Super(pkArrow, a_Creator, a_Pos, 0.5, 0.5),
m_PickupState(psNoPickup),
m_DamageCoeff(2),
m_IsCritical(false),
@@ -35,7 +35,7 @@ cArrowEntity::cArrowEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed
cArrowEntity::cArrowEntity(cPlayer & a_Player, double a_Force) :
- super(pkArrow, &a_Player, a_Player.GetThrowStartPos(), a_Player.GetThrowSpeed(a_Force * 1.5 * 20), 0.5, 0.5),
+ Super(pkArrow, &a_Player, a_Player.GetThrowStartPos(), a_Player.GetThrowSpeed(a_Force * 1.5 * 20), 0.5, 0.5),
m_PickupState(psInSurvivalOrCreative),
m_DamageCoeff(2),
m_IsCritical((a_Force >= 1)),
@@ -77,7 +77,7 @@ void cArrowEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
Vector3d Hit = a_HitPos;
Hit += GetSpeed().NormalizeCopy() / 100000; // Make arrow sink into block a bit so it lodges (TODO: investigate how to stop them going so far so that they become black clientside)
- super::OnHitSolidBlock(Hit, a_HitFace);
+ Super::OnHitSolidBlock(Hit, a_HitFace);
Vector3i BlockHit = Hit.Floor();
int X = BlockHit.x, Y = BlockHit.y, Z = BlockHit.z;
@@ -100,7 +100,7 @@ void cArrowEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
- super::OnHitEntity(a_EntityHit, a_HitPos);
+ Super::OnHitEntity(a_EntityHit, a_HitPos);
int Damage = static_cast<int>(GetSpeed().Length() / 20 * m_DamageCoeff + 0.5);
if (m_IsCritical)
@@ -165,7 +165,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
void cArrowEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Entities/ArrowEntity.h b/src/Entities/ArrowEntity.h
index 629fd8987..474932514 100644
--- a/src/Entities/ArrowEntity.h
+++ b/src/Entities/ArrowEntity.h
@@ -22,7 +22,7 @@ class cArrowEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
// tolua_begin
diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index ec6b69326..d5ccd7359 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -15,7 +15,7 @@
cBoat::cBoat(Vector3d a_Pos, eMaterial a_Material) :
- super(etBoat, a_Pos, 0.98, 0.7),
+ Super(etBoat, a_Pos, 0.98, 0.7),
m_LastDamage(0), m_ForwardDirection(0),
m_DamageTaken(0.0f), m_Material(a_Material),
m_RightPaddleUsed(false), m_LeftPaddleUsed(false)
@@ -72,7 +72,7 @@ void cBoat::BroadcastMovementUpdate(const cClientHandle * a_Exclude)
bool cBoat::DoTakeDamage(TakeDamageInfo & TDI)
{
m_LastDamage = 10;
- if (!super::DoTakeDamage(TDI))
+ if (!Super::DoTakeDamage(TDI))
{
return false;
}
@@ -101,7 +101,7 @@ bool cBoat::DoTakeDamage(TakeDamageInfo & TDI)
void cBoat::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_Attachee != nullptr)
{
@@ -132,7 +132,7 @@ void cBoat::OnRightClicked(cPlayer & a_Player)
void cBoat::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Entities/Boat.h b/src/Entities/Boat.h
index 3b9889fc1..4a583a26c 100644
--- a/src/Entities/Boat.h
+++ b/src/Entities/Boat.h
@@ -15,10 +15,14 @@
// tolua_begin
-class cBoat :
+class cBoat:
public cEntity
{
- typedef cEntity super;
+ // tolua_end
+
+ using Super = cEntity;
+
+ // tolua_begin
public:
enum eMaterial
diff --git a/src/Entities/EnderCrystal.cpp b/src/Entities/EnderCrystal.cpp
index dc9872936..0cb8e4e56 100644
--- a/src/Entities/EnderCrystal.cpp
+++ b/src/Entities/EnderCrystal.cpp
@@ -11,7 +11,7 @@
cEnderCrystal::cEnderCrystal(Vector3d a_Pos):
- super(etEnderCrystal, a_Pos, 1.0, 1.0)
+ Super(etEnderCrystal, a_Pos, 1.0, 1.0)
{
SetMaxHealth(5);
}
@@ -41,7 +41,7 @@ void cEnderCrystal::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cEnderCrystal::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
m_World->DoExplosionAt(6.0, GetPosX(), GetPosY(), GetPosZ(), true, esEnderCrystal, this);
diff --git a/src/Entities/EnderCrystal.h b/src/Entities/EnderCrystal.h
index d8e295a3c..f29927549 100644
--- a/src/Entities/EnderCrystal.h
+++ b/src/Entities/EnderCrystal.h
@@ -12,7 +12,7 @@ class cEnderCrystal :
public cEntity
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public:
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 3ff48440c..23a29a3a4 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -889,7 +889,7 @@ void cEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
return;
}
- // Position changed -> super::Tick() called:
+ // Position changed -> Super::Tick() called:
GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, POSX_TOINT, POSZ_TOINT);
// Set swim states (water, lava, and fire):
@@ -941,7 +941,7 @@ void cEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
int BlockY = POSY_TOINT;
int BlockZ = POSZ_TOINT;
- // Position changed -> super::HandlePhysics() called
+ // Position changed -> Super::HandlePhysics() called
GET_AND_VERIFY_CURRENT_CHUNK(NextChunk, BlockX, BlockZ);
// TODO Add collision detection with entities.
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index e51984225..25784081f 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -12,7 +12,7 @@
#define CLASS_PROTODEF(classname) \
virtual bool IsA(const char * a_ClassName) const override\
{ \
- return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
+ return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || Super::IsA(a_ClassName))); \
} \
virtual const char * GetClass(void) const override \
{ \
@@ -24,7 +24,7 @@
} \
virtual const char * GetParentClass(void) const override \
{ \
- return super::GetClass(); \
+ return Super::GetClass(); \
}
#define POSX_TOINT FloorC(GetPosX())
diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp
index 1342f6098..9475a1710 100644
--- a/src/Entities/EntityEffect.cpp
+++ b/src/Entities/EntityEffect.cpp
@@ -365,7 +365,7 @@ void cEntityEffectInstantDamage::OnActivate(cPawn & a_Target)
void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
if (a_Target.IsMob() && static_cast<cMonster &>(a_Target).IsUndead())
{
@@ -392,7 +392,7 @@ void cEntityEffectRegeneration::OnTick(cPawn & a_Target)
void cEntityEffectHunger::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
if (a_Target.IsPlayer())
{
@@ -426,7 +426,7 @@ void cEntityEffectInvisibility::BroadcastMetadata(cPawn & a_Target)
void cEntityEffectWeakness::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
// Damage reduction = 0.5 damage, multiplied by potion level (Weakness II = 1 damage)
// double dmg_reduc = 0.5 * (a_Effect.GetIntensity() + 1);
@@ -444,7 +444,7 @@ void cEntityEffectWeakness::OnTick(cPawn & a_Target)
void cEntityEffectPoison::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
if (a_Target.IsMob())
{
@@ -483,7 +483,7 @@ void cEntityEffectPoison::OnTick(cPawn & a_Target)
void cEntityEffectWither::OnTick(cPawn & a_Target)
{
- super::OnTick(a_Target);
+ Super::OnTick(a_Target);
// Damage frequency = 40 ticks, divided by effect level (Wither II = 20 ticks)
int frequency = std::max(1, FloorC(40.0 / static_cast<double>(m_Intensity + 1)));
diff --git a/src/Entities/EntityEffect.h b/src/Entities/EntityEffect.h
index dd126c20d..eebf0e3c8 100644
--- a/src/Entities/EntityEffect.h
+++ b/src/Entities/EntityEffect.h
@@ -131,10 +131,12 @@ protected:
class cEntityEffectSpeed:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectSpeed(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -150,10 +152,12 @@ public:
class cEntityEffectSlowness:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectSlowness(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -169,10 +173,12 @@ public:
class cEntityEffectHaste:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectHaste(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -184,10 +190,12 @@ public:
class cEntityEffectMiningFatigue:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectMiningFatigue(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -199,10 +207,12 @@ public:
class cEntityEffectStrength:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectStrength(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -214,10 +224,12 @@ public:
class cEntityEffectInstantHealth:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectInstantHealth(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -231,10 +243,12 @@ public:
class cEntityEffectInstantDamage:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectInstantDamage(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -248,10 +262,12 @@ public:
class cEntityEffectJumpBoost:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectJumpBoost(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -263,10 +279,12 @@ public:
class cEntityEffectNausea:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectNausea(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -278,10 +296,12 @@ public:
class cEntityEffectRegeneration:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectRegeneration(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -295,10 +315,12 @@ public:
class cEntityEffectResistance:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectResistance(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -310,10 +332,12 @@ public:
class cEntityEffectFireResistance:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectFireResistance(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -325,10 +349,12 @@ public:
class cEntityEffectWaterBreathing:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectWaterBreathing(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -340,10 +366,12 @@ public:
class cEntityEffectInvisibility:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectInvisibility(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -361,10 +389,12 @@ private:
class cEntityEffectBlindness:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectBlindness(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -376,10 +406,12 @@ public:
class cEntityEffectNightVision:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectNightVision(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -391,10 +423,12 @@ public:
class cEntityEffectHunger:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectHunger(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -409,10 +443,12 @@ public:
class cEntityEffectWeakness:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectWeakness(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -427,10 +463,12 @@ public:
class cEntityEffectPoison:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectPoison(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -445,10 +483,12 @@ public:
class cEntityEffectWither:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectWither(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
@@ -463,10 +503,12 @@ public:
class cEntityEffectHealthBoost:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectHealthBoost(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -478,10 +520,12 @@ public:
class cEntityEffectAbsorption:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectAbsorption(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
};
@@ -493,10 +537,12 @@ public:
class cEntityEffectSaturation:
public cEntityEffect
{
- typedef cEntityEffect super;
+ using Super = cEntityEffect;
+
public:
+
cEntityEffectSaturation(int a_Duration, short a_Intensity, double a_DistanceModifier = 1):
- super(a_Duration, a_Intensity, a_DistanceModifier)
+ Super(a_Duration, a_Intensity, a_DistanceModifier)
{
}
diff --git a/src/Entities/ExpBottleEntity.cpp b/src/Entities/ExpBottleEntity.cpp
index ed6c759bc..96c063f4e 100644
--- a/src/Entities/ExpBottleEntity.cpp
+++ b/src/Entities/ExpBottleEntity.cpp
@@ -9,7 +9,7 @@
cExpBottleEntity::cExpBottleEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed) :
- super(pkExpBottle, a_Creator, a_Pos, 0.25, 0.25)
+ Super(pkExpBottle, a_Creator, a_Pos, 0.25, 0.25)
{
SetSpeed(a_Speed);
}
diff --git a/src/Entities/ExpBottleEntity.h b/src/Entities/ExpBottleEntity.h
index 126898556..b05f6da31 100644
--- a/src/Entities/ExpBottleEntity.h
+++ b/src/Entities/ExpBottleEntity.h
@@ -22,7 +22,7 @@ class cExpBottleEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index 3d0c9e2b8..5f1b5cbe2 100644
--- a/src/Entities/ExpOrb.cpp
+++ b/src/Entities/ExpOrb.cpp
@@ -6,7 +6,7 @@
cExpOrb::cExpOrb(Vector3d a_Pos, int a_Reward):
- super(etExpOrb, a_Pos, 0.98, 0.98), // TODO: Check size
+ Super(etExpOrb, a_Pos, 0.98, 0.98), // TODO: Check size
m_Reward(a_Reward),
m_Timer(0)
{
@@ -100,7 +100,7 @@ bool cExpOrb::DoTakeDamage(TakeDamageInfo & a_TDI)
return true;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Entities/ExpOrb.h b/src/Entities/ExpOrb.h
index 326e28b1d..3a7f4ee69 100644
--- a/src/Entities/ExpOrb.h
+++ b/src/Entities/ExpOrb.h
@@ -8,14 +8,15 @@
// tolua_begin
-class cExpOrb :
+class cExpOrb:
public cEntity
{
- typedef cEntity super;
-
-public:
// tolua_end
+ using Super = cEntity;
+
+public: // tolua_export
+
CLASS_PROTODEF(cExpOrb)
cExpOrb(Vector3d a_Pos, int a_Reward);
diff --git a/src/Entities/FallingBlock.cpp b/src/Entities/FallingBlock.cpp
index 18cd3e086..ed0661dae 100644
--- a/src/Entities/FallingBlock.cpp
+++ b/src/Entities/FallingBlock.cpp
@@ -12,7 +12,7 @@
cFallingBlock::cFallingBlock(Vector3d a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta):
- super(etFallingBlock, a_Position, 0.98, 0.98),
+ Super(etFallingBlock, a_Position, 0.98, 0.98),
m_BlockType(a_BlockType),
m_BlockMeta(a_BlockMeta)
{
diff --git a/src/Entities/FallingBlock.h b/src/Entities/FallingBlock.h
index dfac287fd..5f083402b 100644
--- a/src/Entities/FallingBlock.h
+++ b/src/Entities/FallingBlock.h
@@ -13,7 +13,7 @@ class cFallingBlock :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/FireChargeEntity.cpp b/src/Entities/FireChargeEntity.cpp
index 2e544ee5d..325c54731 100644
--- a/src/Entities/FireChargeEntity.cpp
+++ b/src/Entities/FireChargeEntity.cpp
@@ -8,7 +8,7 @@
cFireChargeEntity::cFireChargeEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkFireCharge, a_Creator, a_Pos, 0.3125, 0.3125)
+ Super(pkFireCharge, a_Creator, a_Pos, 0.3125, 0.3125)
{
SetSpeed(a_Speed);
SetGravity(0);
@@ -43,7 +43,7 @@ void cFireChargeEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
void cFireChargeEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
- super::OnHitEntity(a_EntityHit, a_HitPos);
+ Super::OnHitEntity(a_EntityHit, a_HitPos);
Destroy();
Explode(a_HitPos.Floor());
diff --git a/src/Entities/FireChargeEntity.h b/src/Entities/FireChargeEntity.h
index ef5ecd075..93e273c2c 100644
--- a/src/Entities/FireChargeEntity.h
+++ b/src/Entities/FireChargeEntity.h
@@ -22,7 +22,7 @@ class cFireChargeEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/FireworkEntity.cpp b/src/Entities/FireworkEntity.cpp
index b4050d07b..987d5a329 100644
--- a/src/Entities/FireworkEntity.cpp
+++ b/src/Entities/FireworkEntity.cpp
@@ -9,7 +9,7 @@
cFireworkEntity::cFireworkEntity(cEntity * a_Creator, Vector3d a_Pos, const cItem & a_Item) :
- super(pkFirework, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkFirework, a_Creator, a_Pos, 0.25, 0.25),
m_TicksToExplosion(a_Item.m_FireworkItem.m_FlightTimeInTicks),
m_FireworkItem(a_Item)
{
@@ -64,7 +64,7 @@ void cFireworkEntity::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_C
void cFireworkEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Entities/FireworkEntity.h b/src/Entities/FireworkEntity.h
index 20689165f..ce30c392e 100644
--- a/src/Entities/FireworkEntity.h
+++ b/src/Entities/FireworkEntity.h
@@ -22,7 +22,7 @@ class cFireworkEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp
index 5c16446c8..1faf9ff0a 100644
--- a/src/Entities/Floater.cpp
+++ b/src/Entities/Floater.cpp
@@ -75,7 +75,7 @@ protected:
cFloater::cFloater(Vector3d a_Pos, Vector3d a_Speed, UInt32 a_PlayerID, int a_CountDownTime) :
- super(etFloater, a_Pos, 0.2, 0.2),
+ Super(etFloater, a_Pos, 0.2, 0.2),
m_BitePos(a_Pos),
m_CanPickupItem(false),
m_PickupCountDown(0),
diff --git a/src/Entities/Floater.h b/src/Entities/Floater.h
index 25a80996a..0c20632db 100644
--- a/src/Entities/Floater.h
+++ b/src/Entities/Floater.h
@@ -13,7 +13,7 @@ class cFloater :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/GhastFireballEntity.cpp b/src/Entities/GhastFireballEntity.cpp
index 8a84a99d6..31dd3dbc9 100644
--- a/src/Entities/GhastFireballEntity.cpp
+++ b/src/Entities/GhastFireballEntity.cpp
@@ -8,7 +8,7 @@
cGhastFireballEntity::cGhastFireballEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkGhastFireball, a_Creator, a_Pos, 1, 1)
+ Super(pkGhastFireball, a_Creator, a_Pos, 1, 1)
{
SetSpeed(a_Speed);
SetGravity(0);
diff --git a/src/Entities/GhastFireballEntity.h b/src/Entities/GhastFireballEntity.h
index ba1fb424b..41ac7f75b 100644
--- a/src/Entities/GhastFireballEntity.h
+++ b/src/Entities/GhastFireballEntity.h
@@ -22,7 +22,7 @@ class cGhastFireballEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/HangingEntity.cpp b/src/Entities/HangingEntity.cpp
index e69efdb73..20b751c74 100644
--- a/src/Entities/HangingEntity.cpp
+++ b/src/Entities/HangingEntity.cpp
@@ -10,7 +10,7 @@
cHangingEntity::cHangingEntity(eEntityType a_EntityType, eBlockFace a_Facing, Vector3d a_Pos) :
- super(a_EntityType, a_Pos, 0.8, 0.8),
+ Super(a_EntityType, a_Pos, 0.8, 0.8),
m_Facing(cHangingEntity::BlockFaceToProtocolFace(a_Facing))
{
SetMaxHealth(1);
diff --git a/src/Entities/HangingEntity.h b/src/Entities/HangingEntity.h
index 097ffeb0d..2a15582be 100644
--- a/src/Entities/HangingEntity.h
+++ b/src/Entities/HangingEntity.h
@@ -13,7 +13,7 @@ class cHangingEntity :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/ItemFrame.cpp b/src/Entities/ItemFrame.cpp
index ac0dc3503..03a3186cf 100644
--- a/src/Entities/ItemFrame.cpp
+++ b/src/Entities/ItemFrame.cpp
@@ -10,7 +10,7 @@
cItemFrame::cItemFrame(eBlockFace a_BlockFace, Vector3d a_Pos):
- super(etItemFrame, a_BlockFace, a_Pos),
+ Super(etItemFrame, a_BlockFace, a_Pos),
m_Item(E_BLOCK_AIR),
m_ItemRotation(0)
{
@@ -22,7 +22,7 @@ cItemFrame::cItemFrame(eBlockFace a_BlockFace, Vector3d a_Pos):
void cItemFrame::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (!m_Item.IsEmpty())
{
@@ -56,7 +56,7 @@ void cItemFrame::KilledBy(TakeDamageInfo & a_TDI)
{
if (m_Item.IsEmpty())
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
Destroy();
return;
}
@@ -94,7 +94,7 @@ void cItemFrame::GetDrops(cItems & a_Items, cEntity * a_Killer)
void cItemFrame::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendSpawnObject(*this, 71, GetProtocolFacing(), static_cast<Byte>(GetYaw()), static_cast<Byte>(GetPitch()));
a_ClientHandle.SendEntityMetadata(*this);
}
diff --git a/src/Entities/ItemFrame.h b/src/Entities/ItemFrame.h
index 7266ae88d..82aece7b7 100644
--- a/src/Entities/ItemFrame.h
+++ b/src/Entities/ItemFrame.h
@@ -13,7 +13,7 @@ class cItemFrame :
{
// tolua_end
- using super = cHangingEntity;
+ using Super = cHangingEntity;
public: // tolua_export
diff --git a/src/Entities/LeashKnot.cpp b/src/Entities/LeashKnot.cpp
index 82439e5cf..aa9e3dfb4 100644
--- a/src/Entities/LeashKnot.cpp
+++ b/src/Entities/LeashKnot.cpp
@@ -15,7 +15,7 @@
cLeashKnot::cLeashKnot(eBlockFace a_BlockFace, Vector3d a_Pos) :
- super(etLeashKnot, a_BlockFace, a_Pos),
+ Super(etLeashKnot, a_BlockFace, a_Pos),
m_ShouldSelfDestroy(false),
m_TicksToSelfDestroy(20 * 1)
{
@@ -27,7 +27,7 @@ cLeashKnot::cLeashKnot(eBlockFace a_BlockFace, Vector3d a_Pos) :
void cLeashKnot::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
TiePlayersLeashedMobs(a_Player, true);
@@ -82,7 +82,7 @@ void cLeashKnot::TiePlayersLeashedMobs(cPlayer & a_Player, bool a_ShouldBroadcas
void cLeashKnot::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
m_World->BroadcastSoundEffect("entity.leashknot.break", GetPosition(), 1, 1);
Destroy();
return;
@@ -106,7 +106,7 @@ void cLeashKnot::GetDrops(cItems & a_Items, cEntity * a_Killer)
void cLeashKnot::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendSpawnObject(*this, 77, GetProtocolFacing(), static_cast<Byte>(GetYaw()), static_cast<Byte>(GetPitch()));
a_ClientHandle.SendEntityMetadata(*this);
}
diff --git a/src/Entities/LeashKnot.h b/src/Entities/LeashKnot.h
index 685dbec5b..8a8d0a45e 100644
--- a/src/Entities/LeashKnot.h
+++ b/src/Entities/LeashKnot.h
@@ -14,7 +14,7 @@ class cLeashKnot :
public cHangingEntity
{
// tolua_end
- using super = cHangingEntity;
+ using Super = cHangingEntity;
public: // tolua_export
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index d5e50fc41..35bbdf617 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -95,7 +95,7 @@ protected:
// cMinecart:
cMinecart::cMinecart(ePayload a_Payload, Vector3d a_Pos):
- super(etMinecart, a_Pos, 0.98, 0.7),
+ Super(etMinecart, a_Pos, 0.98, 0.7),
m_Payload(a_Payload),
m_LastDamage(0),
m_DetectorRailPosition(0, 0, 0),
@@ -132,7 +132,7 @@ void cMinecart::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
if ((PosY <= 0) || (PosY >= cChunkDef::Height))
{
// Outside the world, just process normal falling physics
- super::HandlePhysics(a_Dt, a_Chunk);
+ Super::HandlePhysics(a_Dt, a_Chunk);
BroadcastMovementUpdate();
return;
}
@@ -192,7 +192,7 @@ void cMinecart::HandlePhysics(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
// Not on rail, default physics
SetPosY(floor(GetPosY()) + 0.35); // HandlePhysics overrides this if minecart can fall, else, it is to stop ground clipping minecart bottom when off-rail
- super::HandlePhysics(a_Dt, *chunk);
+ Super::HandlePhysics(a_Dt, *chunk);
}
if (m_bIsOnDetectorRail && !Vector3i(POSX_TOINT, POSY_TOINT, POSZ_TOINT).Equals(m_DetectorRailPosition))
@@ -1044,11 +1044,11 @@ bool cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
Destroy();
TDI.FinalDamage = GetMaxHealth(); // Instant hit for creative
SetInvulnerableTicks(0);
- return super::DoTakeDamage(TDI); // No drops for creative
+ return Super::DoTakeDamage(TDI); // No drops for creative
}
m_LastDamage = static_cast<int>(TDI.FinalDamage);
- if (!super::DoTakeDamage(TDI))
+ if (!Super::DoTakeDamage(TDI))
{
return false;
}
@@ -1145,7 +1145,7 @@ void cMinecart::DoSetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
a_SpeedZ = MAX_SPEED_NEGATIVE;
}
- super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
+ Super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
}
@@ -1168,7 +1168,7 @@ void cMinecart::Destroyed()
// cRideableMinecart:
cRideableMinecart::cRideableMinecart(Vector3d a_Pos, const cItem & a_Content, int a_Height):
- super(mpNone, a_Pos),
+ Super(mpNone, a_Pos),
m_Content(a_Content),
m_Height(a_Height)
{
@@ -1180,7 +1180,7 @@ cRideableMinecart::cRideableMinecart(Vector3d a_Pos, const cItem & a_Content, in
void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_Attachee != nullptr)
{
@@ -1213,7 +1213,7 @@ void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
// cMinecartWithChest:
cMinecartWithChest::cMinecartWithChest(Vector3d a_Pos):
- super(mpChest, a_Pos),
+ Super(mpChest, a_Pos),
cEntityWindowOwner(this),
m_Contents(ContentsWidth, ContentsHeight)
{
@@ -1287,7 +1287,7 @@ void cMinecartWithChest::Destroyed()
// cMinecartWithFurnace:
cMinecartWithFurnace::cMinecartWithFurnace(Vector3d a_Pos):
- super(mpFurnace, a_Pos),
+ Super(mpFurnace, a_Pos),
m_FueledTimeLeft(-1),
m_IsFueled(false)
{
@@ -1321,7 +1321,7 @@ void cMinecartWithFurnace::OnRightClicked(cPlayer & a_Player)
void cMinecartWithFurnace::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -1354,7 +1354,7 @@ void cMinecartWithFurnace::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk
// cMinecartWithTNT:
cMinecartWithTNT::cMinecartWithTNT(Vector3d a_Pos):
- super(mpTNT, a_Pos)
+ Super(mpTNT, a_Pos)
{
}
@@ -1368,7 +1368,7 @@ cMinecartWithTNT::cMinecartWithTNT(Vector3d a_Pos):
// cMinecartWithHopper:
cMinecartWithHopper::cMinecartWithHopper(Vector3d a_Pos):
- super(mpHopper, a_Pos)
+ Super(mpHopper, a_Pos)
{
}
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index 79624494c..fe9ad8ce8 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -20,7 +20,7 @@
class cMinecart :
public cEntity
{
- using super = cEntity;
+ using Super = cEntity;
public:
CLASS_PROTODEF(cMinecart)
@@ -97,7 +97,7 @@ protected:
class cRideableMinecart :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
@@ -127,7 +127,7 @@ class cMinecartWithChest :
public cItemGrid::cListener,
public cEntityWindowOwner
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
@@ -178,7 +178,7 @@ protected:
class cMinecartWithFurnace :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
@@ -211,7 +211,7 @@ private:
class cMinecartWithTNT :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
CLASS_PROTODEF(cMinecartWithTNT)
@@ -226,7 +226,7 @@ public:
class cMinecartWithHopper :
public cMinecart
{
- using super = cMinecart;
+ using Super = cMinecart;
public:
diff --git a/src/Entities/Painting.cpp b/src/Entities/Painting.cpp
index a968356c4..d12469f98 100644
--- a/src/Entities/Painting.cpp
+++ b/src/Entities/Painting.cpp
@@ -11,7 +11,7 @@
cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_Pos):
- super(etPainting, a_Direction, a_Pos),
+ Super(etPainting, a_Direction, a_Pos),
m_Name(a_Name)
{
}
@@ -22,7 +22,7 @@ cPainting::cPainting(const AString & a_Name, eBlockFace a_Direction, Vector3d a_
void cPainting::SpawnOn(cClientHandle & a_Client)
{
- super::SpawnOn(a_Client);
+ Super::SpawnOn(a_Client);
a_Client.SendPaintingSpawn(*this);
}
diff --git a/src/Entities/Painting.h b/src/Entities/Painting.h
index efe8a70cb..844fd72f5 100644
--- a/src/Entities/Painting.h
+++ b/src/Entities/Painting.h
@@ -13,7 +13,7 @@ class cPainting :
{
// tolua_end
- using super = cHangingEntity;
+ using Super = cHangingEntity;
public: // tolua_export
@@ -30,7 +30,7 @@ private:
virtual void GetDrops(cItems & a_Items, cEntity * a_Killer) override;
virtual void KilledBy(TakeDamageInfo & a_TDI) override
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
Destroy();
}
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 9481daa8c..109a1c70e 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -15,7 +15,7 @@
cPawn::cPawn(eEntityType a_EntityType, double a_Width, double a_Height) :
- super(a_EntityType, Vector3d(), a_Width, a_Height),
+ Super(a_EntityType, Vector3d(), a_Width, a_Height),
m_EntityEffects(tEffectMap()),
m_LastGroundHeight(0),
m_bTouchGround(false)
@@ -40,7 +40,7 @@ cPawn::~cPawn()
void cPawn::Destroyed()
{
StopEveryoneFromTargetingMe();
- super::Destroyed();
+ Super::Destroyed();
}
@@ -114,7 +114,7 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
);
}
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -130,7 +130,7 @@ void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cPawn::KilledBy(TakeDamageInfo & a_TDI)
{
ClearEntityEffects();
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
}
@@ -139,7 +139,7 @@ void cPawn::KilledBy(TakeDamageInfo & a_TDI)
bool cPawn::IsFireproof(void) const
{
- return super::IsFireproof() || HasEntityEffect(cEntityEffect::effFireResistance);
+ return Super::IsFireproof() || HasEntityEffect(cEntityEffect::effFireResistance);
}
@@ -163,7 +163,7 @@ void cPawn::HandleAir(void)
return;
}
- super::HandleAir();
+ Super::HandleAir();
}
@@ -499,6 +499,6 @@ cEntityEffect * cPawn::GetEntityEffect(cEntityEffect::eType a_EffectType)
void cPawn::ResetPosition(Vector3d a_NewPosition)
{
- super::ResetPosition(a_NewPosition);
+ Super::ResetPosition(a_NewPosition);
m_LastGroundHeight = GetPosY();
}
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h
index 4de0e14b2..f68db63e9 100644
--- a/src/Entities/Pawn.h
+++ b/src/Entities/Pawn.h
@@ -12,13 +12,14 @@ class cMonster;
// tolua_begin
-class cPawn :
+class cPawn:
public cEntity
{
// tolua_end
- typedef cEntity super;
+ using Super = cEntity;
public:
+
CLASS_PROTODEF(cPawn)
cPawn(eEntityType a_EntityType, double a_Width, double a_Height);
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 1ab01c631..5c8d58f21 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -97,7 +97,7 @@ protected:
// cPickup:
cPickup::cPickup(Vector3d a_Pos, const cItem & a_Item, bool IsPlayerCreated, Vector3f a_Speed, int a_LifetimeTicks, bool a_CanCombine):
- super(etPickup, a_Pos, 0.2, 0.2),
+ Super(etPickup, a_Pos, 0.2, 0.2),
m_Timer(0),
m_Item(a_Item),
m_bCollected(false),
@@ -127,7 +127,7 @@ void cPickup::SpawnOn(cClientHandle & a_Client)
void cPickup::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -204,7 +204,7 @@ bool cPickup::DoTakeDamage(TakeDamageInfo & a_TDI)
return true;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Entities/Pickup.h b/src/Entities/Pickup.h
index e1f3ed1a8..73540a64e 100644
--- a/src/Entities/Pickup.h
+++ b/src/Entities/Pickup.h
@@ -20,7 +20,7 @@ class cPickup :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
public: // tolua_export
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 02cb7378d..40486d39e 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -86,7 +86,7 @@ const int cPlayer::EATING_TICKS = 30;
cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) :
- super(etPlayer, 0.6, 1.8),
+ Super(etPlayer, 0.6, 1.8),
m_bVisible(true),
m_FoodLevel(MAX_FOOD_LEVEL),
m_FoodSaturationLevel(5.0),
@@ -227,7 +227,7 @@ cPlayer::~cPlayer(void)
void cPlayer::Destroyed()
{
CloseWindow(false);
- super::Destroyed();
+ Super::Destroyed();
}
@@ -306,7 +306,7 @@ void cPlayer::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
ASSERT(a_Chunk.IsValid());
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
// Handle charging the bow:
if (m_IsChargingBow)
@@ -600,7 +600,7 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
void cPlayer::Heal(int a_Health)
{
- super::Heal(a_Health);
+ Super::Heal(a_Health);
SendHealth();
}
@@ -1024,7 +1024,7 @@ bool cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
}
}
- if (super::DoTakeDamage(a_TDI))
+ if (Super::DoTakeDamage(a_TDI))
{
// Any kind of damage adds food exhaustion
AddFoodExhaustion(0.3f);
@@ -1074,7 +1074,7 @@ void cPlayer::NotifyNearbyWolves(cPawn * a_Opponent, bool a_IsPlayerInvolved)
void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
if (m_Health > 0)
{
@@ -1766,7 +1766,7 @@ void cPlayer::DoSetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
// Do not set speed to a frozen client
return;
}
- super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
+ Super::DoSetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ);
// Send the speed to the client so he actualy moves
m_ClientHandle->SendEntityVelocity(*this);
}
@@ -2878,7 +2878,7 @@ void cPlayer::AttachTo(cEntity * a_AttachTo)
return;
}
- super::AttachTo(a_AttachTo);
+ Super::AttachTo(a_AttachTo);
}
@@ -2902,7 +2902,7 @@ void cPlayer::Detach()
return;
}
- super::Detach();
+ Super::Detach();
int PosX = POSX_TOINT;
int PosY = POSY_TOINT;
int PosZ = POSZ_TOINT;
@@ -3099,7 +3099,7 @@ float cPlayer::GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_Ex
return 0; // No impact from explosion
}
- return super::GetExplosionExposureRate(a_ExplosionPosition, a_ExlosionPower) / 30.0f;
+ return Super::GetExplosionExposureRate(a_ExplosionPosition, a_ExlosionPower) / 30.0f;
}
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 3ba87f748..a28e37be0 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -24,12 +24,18 @@ class cTeam;
// tolua_begin
-class cPlayer :
+class cPlayer:
public cPawn
{
- typedef cPawn super;
+
+ // tolua_end
+
+ using Super = cPawn;
+
+ // tolua_begin
public:
+
static const int MAX_HEALTH;
static const int MAX_FOOD_LEVEL;
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 9314c875d..e4fec043e 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -226,7 +226,7 @@ protected:
// cProjectileEntity:
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, double a_Width, double a_Height):
- super(etProjectile, a_Pos, a_Width, a_Height),
+ Super(etProjectile, a_Pos, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(
((a_Creator != nullptr) ? a_Creator->GetUniqueID() : cEntity::INVALID_ID),
@@ -244,7 +244,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed, double a_Width, double a_Height):
- super(etProjectile, a_Pos, a_Width, a_Height),
+ Super(etProjectile, a_Pos, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(a_Creator->GetUniqueID(), a_Creator->IsPlayer() ? static_cast<cPlayer *>(a_Creator)->GetName() : "", a_Creator->GetEquippedWeapon().m_Enchantments),
m_IsInGround(false)
@@ -370,7 +370,7 @@ AString cProjectileEntity::GetMCAClassName(void) const
void cProjectileEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h
index c74fdd6af..439b10118 100644
--- a/src/Entities/ProjectileEntity.h
+++ b/src/Entities/ProjectileEntity.h
@@ -22,7 +22,7 @@ class cProjectileEntity :
{
// tolua_end
- using super = cEntity;
+ using Super = cEntity;
// tolua_begin
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp
index 15a0c3c9a..bfe708d06 100644
--- a/src/Entities/SplashPotionEntity.cpp
+++ b/src/Entities/SplashPotionEntity.cpp
@@ -25,7 +25,7 @@ cSplashPotionEntity::cSplashPotionEntity(
Vector3d a_Speed,
const cItem & a_Item
):
- super(pkSplashPotion, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkSplashPotion, a_Creator, a_Pos, 0.25, 0.25),
m_Item(a_Item),
m_DestroyTimer(-1)
{
diff --git a/src/Entities/SplashPotionEntity.h b/src/Entities/SplashPotionEntity.h
index b90d0a317..8427f34b3 100644
--- a/src/Entities/SplashPotionEntity.h
+++ b/src/Entities/SplashPotionEntity.h
@@ -26,7 +26,7 @@ class cSplashPotionEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
@@ -76,7 +76,7 @@ protected:
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/TNTEntity.cpp b/src/Entities/TNTEntity.cpp
index 6ee56b92a..ac9d68f72 100644
--- a/src/Entities/TNTEntity.cpp
+++ b/src/Entities/TNTEntity.cpp
@@ -9,7 +9,7 @@
cTNTEntity::cTNTEntity(Vector3d a_Pos, int a_FuseTicks) :
- super(etTNT, a_Pos, 0.98, 0.98),
+ Super(etTNT, a_Pos, 0.98, 0.98),
m_FuseTicks(a_FuseTicks)
{
SetGravity(-16.0f);
@@ -45,7 +45,7 @@ void cTNTEntity::Explode(void)
void cTNTEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Entities/TNTEntity.h b/src/Entities/TNTEntity.h
index 25c74ded5..ef8b8ec3c 100644
--- a/src/Entities/TNTEntity.h
+++ b/src/Entities/TNTEntity.h
@@ -7,13 +7,16 @@
// tolua_begin
-class cTNTEntity :
+class cTNTEntity:
public cEntity
{
- typedef cEntity super;
-public:
// tolua_end
+
+ using Super = cEntity;
+
+public: // tolua_export
+
CLASS_PROTODEF(cTNTEntity)
cTNTEntity(Vector3d a_Pos, int a_FuseTicks = 80);
diff --git a/src/Entities/ThrownEggEntity.cpp b/src/Entities/ThrownEggEntity.cpp
index 14832beed..bc5ed665e 100644
--- a/src/Entities/ThrownEggEntity.cpp
+++ b/src/Entities/ThrownEggEntity.cpp
@@ -8,7 +8,7 @@
cThrownEggEntity::cThrownEggEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkEgg, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkEgg, a_Creator, a_Pos, 0.25, 0.25),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
@@ -64,7 +64,7 @@ void cThrownEggEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/ThrownEggEntity.h b/src/Entities/ThrownEggEntity.h
index d49153d49..f6240a680 100644
--- a/src/Entities/ThrownEggEntity.h
+++ b/src/Entities/ThrownEggEntity.h
@@ -22,7 +22,7 @@ class cThrownEggEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/ThrownEnderPearlEntity.cpp b/src/Entities/ThrownEnderPearlEntity.cpp
index 8cc266ef6..4f1029b27 100644
--- a/src/Entities/ThrownEnderPearlEntity.cpp
+++ b/src/Entities/ThrownEnderPearlEntity.cpp
@@ -9,7 +9,7 @@
cThrownEnderPearlEntity::cThrownEnderPearlEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkEnderPearl, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkEnderPearl, a_Creator, a_Pos, 0.25, 0.25),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
@@ -59,7 +59,7 @@ void cThrownEnderPearlEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Ch
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/ThrownEnderPearlEntity.h b/src/Entities/ThrownEnderPearlEntity.h
index ad1761f8e..c61b20401 100644
--- a/src/Entities/ThrownEnderPearlEntity.h
+++ b/src/Entities/ThrownEnderPearlEntity.h
@@ -22,7 +22,7 @@ class cThrownEnderPearlEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/ThrownSnowballEntity.cpp b/src/Entities/ThrownSnowballEntity.cpp
index 5dadcc15e..d10aaf25d 100644
--- a/src/Entities/ThrownSnowballEntity.cpp
+++ b/src/Entities/ThrownSnowballEntity.cpp
@@ -8,7 +8,7 @@
cThrownSnowballEntity::cThrownSnowballEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkSnowball, a_Creator, a_Pos, 0.25, 0.25),
+ Super(pkSnowball, a_Creator, a_Pos, 0.25, 0.25),
m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
@@ -29,7 +29,7 @@ void cThrownSnowballEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitF
void cThrownSnowballEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
- super::OnHitEntity(a_EntityHit, a_HitPos);
+ Super::OnHitEntity(a_EntityHit, a_HitPos);
int TotalDamage = 0;
if (a_EntityHit.IsMob())
@@ -63,7 +63,7 @@ void cThrownSnowballEntity::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chun
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
}
diff --git a/src/Entities/ThrownSnowballEntity.h b/src/Entities/ThrownSnowballEntity.h
index 79010071b..a4fcd3cb6 100644
--- a/src/Entities/ThrownSnowballEntity.h
+++ b/src/Entities/ThrownSnowballEntity.h
@@ -22,7 +22,7 @@ class cThrownSnowballEntity :
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Entities/WitherSkullEntity.cpp b/src/Entities/WitherSkullEntity.cpp
index 55f1ff32f..1bb17ab2b 100644
--- a/src/Entities/WitherSkullEntity.cpp
+++ b/src/Entities/WitherSkullEntity.cpp
@@ -13,7 +13,7 @@
cWitherSkullEntity::cWitherSkullEntity(cEntity * a_Creator, Vector3d a_Pos, Vector3d a_Speed):
- super(pkWitherSkull, a_Creator, a_Pos, 0.25, 0.25)
+ Super(pkWitherSkull, a_Creator, a_Pos, 0.25, 0.25)
{
SetSpeed(a_Speed);
SetGravity(0);
diff --git a/src/Entities/WitherSkullEntity.h b/src/Entities/WitherSkullEntity.h
index f70b71bf5..f335b1da7 100644
--- a/src/Entities/WitherSkullEntity.h
+++ b/src/Entities/WitherSkullEntity.h
@@ -22,7 +22,7 @@ public cProjectileEntity
{
// tolua_end
- using super = cProjectileEntity;
+ using Super = cProjectileEntity;
public: // tolua_export
diff --git a/src/Generating/BioGen.cpp b/src/Generating/BioGen.cpp
index c84cb559d..f6122244b 100644
--- a/src/Generating/BioGen.cpp
+++ b/src/Generating/BioGen.cpp
@@ -129,7 +129,7 @@ void cBioGenCache::GenBiomes(cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap & a
void cBioGenCache::InitializeBiomeGen(cIniFile & a_IniFile)
{
- super::InitializeBiomeGen(a_IniFile);
+ Super::InitializeBiomeGen(a_IniFile);
m_BioGenToCache->InitializeBiomeGen(a_IniFile);
}
@@ -280,7 +280,7 @@ void cBioGenCheckerboard::GenBiomes(cChunkCoords a_ChunkCoords, cChunkDef::Biome
void cBioGenCheckerboard::InitializeBiomeGen(cIniFile & a_IniFile)
{
- super::InitializeBiomeGen(a_IniFile);
+ Super::InitializeBiomeGen(a_IniFile);
AString Biomes = a_IniFile.GetValueSet ("Generator", "CheckerBoardBiomes", "");
m_BiomeSize = a_IniFile.GetValueSetI("Generator", "CheckerboardBiomeSize", 64);
m_BiomeSize = (m_BiomeSize < 8) ? 8 : m_BiomeSize;
@@ -315,7 +315,7 @@ void cBioGenVoronoi::GenBiomes(cChunkCoords a_ChunkCoords, cChunkDef::BiomeMap &
void cBioGenVoronoi::InitializeBiomeGen(cIniFile & a_IniFile)
{
- super::InitializeBiomeGen(a_IniFile);
+ Super::InitializeBiomeGen(a_IniFile);
int CellSize = a_IniFile.GetValueSetI("Generator", "VoronoiCellSize", 128);
int JitterSize = a_IniFile.GetValueSetI("Generator", "VoronoiJitterSize", CellSize);
int OddRowOffset = a_IniFile.GetValueSetI("Generator", "VoronoiOddRowOffset", 0);
@@ -364,7 +364,7 @@ void cBioGenDistortedVoronoi::GenBiomes(cChunkCoords a_ChunkCoords, cChunkDef::B
void cBioGenDistortedVoronoi::InitializeBiomeGen(cIniFile & a_IniFile)
{
- super::InitializeBiomeGen(a_IniFile);
+ Super::InitializeBiomeGen(a_IniFile);
m_CellSize = a_IniFile.GetValueSetI("Generator", "DistortedVoronoiCellSize", 96);
m_Voronoi.SetCellSize(m_CellSize);
InitializeBiomes(a_IniFile.GetValueSet("Generator", "DistortedVoronoiBiomes", ""));
diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h
index c20babde0..ee297adb2 100644
--- a/src/Generating/BioGen.h
+++ b/src/Generating/BioGen.h
@@ -42,10 +42,10 @@ protected:
/** A simple cache that stores N most recently generated chunks' biomes; N being settable upon creation */
-class cBioGenCache :
+class cBioGenCache:
public cBiomeGen
{
- typedef cBiomeGen super;
+ using Super = cBiomeGen;
public:
@@ -87,11 +87,10 @@ protected:
-class cBioGenMulticache :
+class cBioGenMulticache:
public cBiomeGen
{
-
- typedef cBiomeGen super;
+ using Super = cBiomeGen;
public:
/* Creates a new multicache - a cache that divides the caching into several sub-caches based on the chunk coords.
@@ -120,12 +119,13 @@ protected:
/** Base class for generators that use a list of available biomes. This class takes care of the list. */
-class cBiomeGenList :
+class cBiomeGenList:
public cBiomeGen
{
- typedef cBiomeGen super;
+ using Super = cBiomeGen;
protected:
+
// List of biomes that the generator is allowed to generate:
typedef std::vector<EMCSBiome> EMCSBiomes;
EMCSBiomes m_Biomes;
@@ -139,12 +139,13 @@ protected:
-class cBioGenCheckerboard :
+class cBioGenCheckerboard:
public cBiomeGenList
{
- typedef cBiomeGenList super;
+ using Super = cBiomeGenList;
protected:
+
int m_BiomeSize;
// cBiomeGen overrides:
@@ -156,18 +157,20 @@ protected:
-class cBioGenVoronoi :
+class cBioGenVoronoi:
public cBiomeGenList
{
- typedef cBiomeGenList super;
+ using Super = cBiomeGenList;
public:
+
cBioGenVoronoi(int a_Seed) :
m_Voronoi(a_Seed)
{
}
protected:
+
cVoronoiMap m_Voronoi;
// cBiomeGen overrides:
@@ -181,13 +184,14 @@ protected:
-class cBioGenDistortedVoronoi :
+class cBioGenDistortedVoronoi:
public cBiomeGenList
{
- typedef cBiomeGenList super;
+ using Super = cBiomeGenList;
public:
- cBioGenDistortedVoronoi(int a_Seed) :
+
+ cBioGenDistortedVoronoi(int a_Seed):
m_Noise(a_Seed),
m_Voronoi(a_Seed),
m_CellSize(0)
@@ -216,12 +220,13 @@ protected:
-class cBioGenMultiStepMap :
+class cBioGenMultiStepMap:
public cBiomeGen
{
- typedef cBiomeGen super;
+ using Super = cBiomeGen;
public:
+
cBioGenMultiStepMap(int a_Seed);
protected:
@@ -276,12 +281,13 @@ protected:
-class cBioGenTwoLevel :
+class cBioGenTwoLevel:
public cBiomeGen
{
- typedef cBiomeGen super;
+ using Super = cBiomeGen;
public:
+
cBioGenTwoLevel(int a_Seed);
protected:
diff --git a/src/Generating/Caves.cpp b/src/Generating/Caves.cpp
index 193c75554..0d22d5b96 100644
--- a/src/Generating/Caves.cpp
+++ b/src/Generating/Caves.cpp
@@ -117,12 +117,13 @@ typedef std::vector<cCaveTunnel *> cCaveTunnels;
/** A collection of connected tunnels, possibly branching. */
-class cStructGenWormNestCaves::cCaveSystem :
+class cStructGenWormNestCaves::cCaveSystem:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure super;
+ using Super = cGridStructGen::cStructure;
public:
+
// The generating block position; is read directly in cStructGenWormNestCaves::GetCavesForChunk()
int m_BlockX;
int m_BlockZ;
@@ -577,7 +578,7 @@ AString cCaveTunnel::ExportAsSVG(int a_Color, int a_OffsetX, int a_OffsetZ) cons
// cStructGenWormNestCaves::cCaveSystem:
cStructGenWormNestCaves::cCaveSystem::cCaveSystem(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_MaxOffset, int a_Size, cNoise & a_Noise) :
- super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
+ Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Size(a_Size)
{
int Num = 1 + a_Noise.IntNoise2DInt(a_OriginX, a_OriginZ) % 3;
diff --git a/src/Generating/Caves.h b/src/Generating/Caves.h
index cf47d9a92..82545b4e0 100644
--- a/src/Generating/Caves.h
+++ b/src/Generating/Caves.h
@@ -62,13 +62,15 @@ protected:
-class cStructGenWormNestCaves :
+class cStructGenWormNestCaves:
public cGridStructGen
{
- typedef cGridStructGen super;
+ using Super = cGridStructGen;
+
public:
+
cStructGenWormNestCaves(int a_Seed, int a_Size = 64, int a_Grid = 96, int a_MaxOffset = 128) :
- super(a_Seed, a_Grid, a_Grid, a_MaxOffset, a_MaxOffset, a_Size, a_Size, 100),
+ Super(a_Seed, a_Grid, a_Grid, a_MaxOffset, a_MaxOffset, a_Size, a_Size, 100),
m_Size(a_Size),
m_MaxOffset(a_MaxOffset),
m_Grid(a_Grid)
@@ -76,6 +78,7 @@ public:
}
protected:
+
class cCaveSystem; // fwd: Caves.cpp
int m_Size; // relative size of the cave systems' caves. Average number of blocks of each initial tunnel
diff --git a/src/Generating/ComposableGenerator.h b/src/Generating/ComposableGenerator.h
index 9c643847c..f0960f1d3 100644
--- a/src/Generating/ComposableGenerator.h
+++ b/src/Generating/ComposableGenerator.h
@@ -200,12 +200,13 @@ typedef std::list<cFinishGenPtr> cFinishGenList;
-class cComposableGenerator :
+class cComposableGenerator:
public cChunkGenerator
{
- typedef cChunkGenerator Super;
+ using Super = cChunkGenerator;
public:
+
cComposableGenerator();
// cChunkGenerator::cGenerator overrides:
diff --git a/src/Generating/DungeonRoomsFinisher.cpp b/src/Generating/DungeonRoomsFinisher.cpp
index c595a6451..4299f71a7 100644
--- a/src/Generating/DungeonRoomsFinisher.cpp
+++ b/src/Generating/DungeonRoomsFinisher.cpp
@@ -24,10 +24,10 @@ static const int ROOM_HEIGHT = 4;
////////////////////////////////////////////////////////////////////////////////
// cDungeonRoom:
-class cDungeonRoom :
+class cDungeonRoom:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure super;
+ using Super = cGridStructGen::cStructure;
public:
@@ -37,8 +37,8 @@ public:
int a_HalfSizeX, int a_HalfSizeZ,
int a_FloorHeight,
cNoise & a_Noise
- ) :
- super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
+ ):
+ Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_StartX(a_OriginX - a_HalfSizeX),
m_EndX(a_OriginX + a_HalfSizeX),
m_StartZ(a_OriginZ - a_HalfSizeZ),
@@ -288,7 +288,7 @@ protected:
// cDungeonRoomsFinisher:
cDungeonRoomsFinisher::cDungeonRoomsFinisher(cTerrainShapeGenPtr a_ShapeGen, int a_Seed, int a_GridSize, int a_MaxSize, int a_MinSize, const AString & a_HeightDistrib) :
- super(a_Seed + 100, a_GridSize, a_GridSize, a_GridSize, a_GridSize, a_MaxSize, a_MaxSize, 1024),
+ Super(a_Seed + 100, a_GridSize, a_GridSize, a_GridSize, a_GridSize, a_MaxSize, a_MaxSize, 1024),
m_ShapeGen(a_ShapeGen),
m_MaxHalfSize((a_MaxSize + 1) / 2),
m_MinHalfSize((a_MinSize + 1) / 2),
diff --git a/src/Generating/DungeonRoomsFinisher.h b/src/Generating/DungeonRoomsFinisher.h
index e5828f989..72ac5cb51 100644
--- a/src/Generating/DungeonRoomsFinisher.h
+++ b/src/Generating/DungeonRoomsFinisher.h
@@ -16,12 +16,13 @@
-class cDungeonRoomsFinisher :
+class cDungeonRoomsFinisher:
public cGridStructGen
{
- typedef cGridStructGen super;
+ using Super = cGridStructGen;
public:
+
/** Creates a new dungeon room finisher.
a_ShapeGen is the underlying terrain shape generator, so that the rooms can always be placed under the terrain.
a_MaxSize and a_MinSize are the maximum and minimum sizes of the room's internal (air) area, in blocks across.
diff --git a/src/Generating/FinishGen.h b/src/Generating/FinishGen.h
index b6edce84f..4dfd35a7c 100644
--- a/src/Generating/FinishGen.h
+++ b/src/Generating/FinishGen.h
@@ -487,9 +487,10 @@ Note that this class uses the "Nest" terminology for individual packs of ore, it
class cFinishGenOres:
public cFinishGen
{
- typedef cFinishGen Super;
+ using Super = cFinishGen;
public:
+
struct OreInfo
{
BLOCKTYPE m_BlockType; // The type of the nest.
@@ -574,12 +575,13 @@ protected:
-class cFinishGenOreNests :
+class cFinishGenOreNests:
public cFinishGenOres
{
- typedef cFinishGenOres Super;
+ using Super = cFinishGenOres;
public:
+
cFinishGenOreNests(int a_Seed, const OreInfos & a_OreInfos):
Super(a_Seed, a_OreInfos)
{}
@@ -602,9 +604,10 @@ protected:
class cFinishGenOrePockets:
public cFinishGenOres
{
- typedef cFinishGenOres Super;
+ using Super = cFinishGenOres;
public:
+
cFinishGenOrePockets(int a_Seed, const OreInfos & a_OreInfos):
Super(a_Seed, a_OreInfos)
{}
diff --git a/src/Generating/GridStructGen.cpp b/src/Generating/GridStructGen.cpp
index 83a98706f..4a565f220 100644
--- a/src/Generating/GridStructGen.cpp
+++ b/src/Generating/GridStructGen.cpp
@@ -16,14 +16,15 @@
/** A cStructure descendant representing an empty structure.
Used when the generator descended from cGridStructGen doesn't return any structure, to keep at least the
Origin coords so that the structure isn't queried over and over again. */
-class cEmptyStructure :
+class cEmptyStructure:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure super;
+ using Super = cGridStructGen::cStructure;
public:
+
cEmptyStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) :
- super(a_GridX, a_GridZ, a_OriginX, a_OriginZ)
+ Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ)
{
}
diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp
index 16b7c826b..515fdf4ba 100644
--- a/src/Generating/HeiGen.cpp
+++ b/src/Generating/HeiGen.cpp
@@ -629,12 +629,13 @@ NOISE_DATATYPE cHeiGenBiomal::GetHeightAt(int a_RelX, int a_RelZ, int a_ChunkX,
class cHeiGenMinMax:
public cTerrainHeightGen
{
- typedef cTerrainHeightGen Super;
+ using Super = cTerrainHeightGen;
/** Size of the averaging process, in columns (for each direction). Must be less than 16. */
static const int AVERAGING_SIZE = 4;
public:
+
cHeiGenMinMax(int a_Seed, cBiomeGenPtr a_BiomeGen):
m_Noise(a_Seed),
m_BiomeGen(a_BiomeGen),
diff --git a/src/Generating/HeiGen.h b/src/Generating/HeiGen.h
index e4fa12fb3..c8118860e 100644
--- a/src/Generating/HeiGen.h
+++ b/src/Generating/HeiGen.h
@@ -167,13 +167,14 @@ protected:
-class cHeiGenBiomal :
+class cHeiGenBiomal:
public cTerrainHeightGen
{
- typedef cTerrainHeightGen Super;
+ using Super = cTerrainHeightGen;
public:
- cHeiGenBiomal(int a_Seed, cBiomeGenPtr a_BiomeGen) :
+
+ cHeiGenBiomal(int a_Seed, cBiomeGenPtr a_BiomeGen):
m_Noise(a_Seed),
m_BiomeGen(a_BiomeGen)
{
diff --git a/src/Generating/IntGen.h b/src/Generating/IntGen.h
index ae46b2de2..3b9f3b027 100644
--- a/src/Generating/IntGen.h
+++ b/src/Generating/IntGen.h
@@ -55,14 +55,14 @@ class cIntGen
{
public:
- typedef cIntGen<SizeX, SizeZ> IntGenType;
+ using IntGenType = cIntGen<SizeX, SizeZ>;
/** Force a virtual destructor in all descendants.
Descendants contain virtual functions and are referred to via pointer-to-base, so they need a virtual destructor. */
virtual ~cIntGen() {}
/** Holds the array of values generated by this class (descendant). */
- typedef int Values[SizeX * SizeZ];
+ using Values = int[SizeX * SizeZ];
/** Generates the array of templated size into a_Values, based on given min coords. */
virtual void GetInts(int a_MinX, int a_MinZ, Values & a_Values) = 0;
@@ -84,7 +84,7 @@ struct sGens : sGens<N - 1, N - 1, S...>
template<int... S>
struct sGens<0, S...>
{
- typedef sSeq<S...> type;
+ using type = sSeq<S...>;
};
@@ -94,7 +94,7 @@ class cIntGenFactory
public:
- typedef Gen Generator;
+ using Generator = Gen;
cIntGenFactory(Args&&... a_args) :
m_args(std::make_tuple<Args...>(std::forward<Args>(a_args)...))
@@ -135,13 +135,14 @@ cIntGenFactory<Gen, Args...> MakeIntGen(Args&&... a_Args)
/** Provides additional cNoise member and its helper functions. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenWithNoise :
+class cIntGenWithNoise:
public cIntGen<SizeX, SizeZ>
{
- typedef cIntGen<SizeX, SizeZ> super;
+ using Super = cIntGen<SizeX, SizeZ>;
public:
- cIntGenWithNoise(int a_Seed) :
+
+ cIntGenWithNoise(int a_Seed):
m_Noise(a_Seed)
{
}
@@ -176,26 +177,27 @@ protected:
/** Generates a 2D array of random integers in the specified range [0 .. Range). */
template <int Range, int SizeX, int SizeZ = SizeX>
-class cIntGenChoice :
+class cIntGenChoice:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- cIntGenChoice(int a_Seed) :
- super(a_Seed)
+
+ cIntGenChoice(int a_Seed):
+ Super(a_Seed)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
for (int z = 0; z < SizeZ; z++)
{
int BaseZ = a_MinZ + z;
for (int x = 0; x < SizeX; x++)
{
- a_Values[x + SizeX * z] = (super::m_Noise.IntNoise2DInt(a_MinX + x, BaseZ) / 7) % Range;
+ a_Values[x + SizeX * z] = (Super::m_Noise.IntNoise2DInt(a_MinX + x, BaseZ) / 7) % Range;
}
} // for z
}
@@ -209,27 +211,28 @@ public:
Has a threshold (in percent) of how much land, the larger the threshold, the more land.
Generates 0 for ocean, biome group ID for landmass. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenLandOcean :
+class cIntGenLandOcean:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- cIntGenLandOcean(int a_Seed, int a_Threshold) :
- super(a_Seed),
+
+ cIntGenLandOcean(int a_Seed, int a_Threshold):
+ Super(a_Seed),
m_Threshold(a_Threshold)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
for (int z = 0; z < SizeZ; z++)
{
int BaseZ = a_MinZ + z;
for (int x = 0; x < SizeX; x++)
{
- int rnd = (super::m_Noise.IntNoise2DInt(a_MinX + x, BaseZ) / 7);
+ int rnd = (Super::m_Noise.IntNoise2DInt(a_MinX + x, BaseZ) / 7);
a_Values[x + SizeX * z] = ((rnd % 100) < m_Threshold) ? ((rnd / 101) % bgLandOceanMax + 1) : 0;
}
}
@@ -253,27 +256,29 @@ protected:
This means that the zoome out image is randomly distorted. Applying zoom several times provides all
the distortion that the generators need. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenZoom :
+class cIntGenZoom:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
protected:
+
static const int m_LowerSizeX = (SizeX / 2) + 2;
static const int m_LowerSizeZ = (SizeZ / 2) + 2;
public:
- typedef std::shared_ptr<cIntGen<m_LowerSizeX, m_LowerSizeZ>> Underlying;
+ using Underlying = std::shared_ptr<cIntGen<m_LowerSizeX, m_LowerSizeZ>>;
- cIntGenZoom(int a_Seed, Underlying a_UnderlyingGen) :
- super(a_Seed),
+
+ cIntGenZoom(int a_Seed, Underlying a_UnderlyingGen):
+ Super(a_Seed),
m_UnderlyingGen(a_UnderlyingGen)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying data with half the resolution:
int lowerMinX = a_MinX >> 1;
@@ -298,9 +303,9 @@ public:
int RndX = (x + lowerMinX) * 2;
int RndZ = (z + lowerMinZ) * 2;
cache[idx] = PrevZ0;
- cache[idx + lowStepX] = super::ChooseRandomOne(RndX, RndZ + 1, PrevZ0, PrevZ1);
- cache[idx + 1] = super::ChooseRandomOne(RndX, RndZ - 1, PrevZ0, ValX1Z0);
- cache[idx + 1 + lowStepX] = super::ChooseRandomOne(RndX, RndZ, PrevZ0, ValX1Z0, PrevZ1, ValX1Z1);
+ cache[idx + lowStepX] = Super::ChooseRandomOne(RndX, RndZ + 1, PrevZ0, PrevZ1);
+ cache[idx + 1] = Super::ChooseRandomOne(RndX, RndZ - 1, PrevZ0, ValX1Z0);
+ cache[idx + 1 + lowStepX] = Super::ChooseRandomOne(RndX, RndZ, PrevZ0, ValX1Z0, PrevZ1, ValX1Z1);
idx += 2;
PrevZ0 = ValX1Z0;
PrevZ1 = ValX1Z1;
@@ -325,25 +330,27 @@ protected:
/** Smoothes out some artifacts generated by the zooming - mostly single-pixel values.
Compares each pixel to its neighbors and if the neighbors are equal, changes the pixel to their value. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenSmooth :
+class cIntGenSmooth:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
+
static const int m_LowerSizeX = SizeX + 2;
static const int m_LowerSizeZ = SizeZ + 2;
public:
- typedef std::shared_ptr<cIntGen<m_LowerSizeX, m_LowerSizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<m_LowerSizeX, m_LowerSizeZ>>;
- cIntGenSmooth(int a_Seed, Underlying a_Underlying) :
- super(a_Seed),
+ cIntGenSmooth(int a_Seed, Underlying a_Underlying):
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying values:
int lowerData[m_LowerSizeX * m_LowerSizeZ];
@@ -364,7 +371,7 @@ public:
if ((left == right) && (above == below))
{
- if (((super::m_Noise.IntNoise2DInt(a_MinX + x, NoiseZ) / 7) % 2) == 0)
+ if (((Super::m_Noise.IntNoise2DInt(a_MinX + x, NoiseZ) / 7) % 2) == 0)
{
val = left;
}
@@ -401,24 +408,26 @@ protected:
/** Converts land biomes at the edge of an ocean into the respective beach biome. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenBeaches :
+class cIntGenBeaches:
public cIntGen<SizeX, SizeZ>
{
- typedef cIntGen<SizeX, SizeZ> super;
+ using Super = cIntGen<SizeX, SizeZ>;
+
static const int m_UnderlyingSizeX = SizeX + 2;
static const int m_UnderlyingSizeZ = SizeZ + 2;
public:
- typedef std::shared_ptr<cIntGen<m_UnderlyingSizeX, m_UnderlyingSizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<m_UnderlyingSizeX, m_UnderlyingSizeZ>>;
- cIntGenBeaches(Underlying a_Underlying) :
+ cIntGenBeaches(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Map for biome -> its beach:
static const int ToBeach[] =
@@ -503,24 +512,25 @@ protected:
/** Generates the underlying numbers and then randomly changes some ocean group pixels into random land
biome group pixels, based on the predefined chance. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenAddIslands :
+class cIntGenAddIslands:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
- cIntGenAddIslands(int a_Seed, int a_Chance, Underlying a_Underlying) :
- super(a_Seed),
+ cIntGenAddIslands(int a_Seed, int a_Chance, Underlying a_Underlying):
+ Super(a_Seed),
m_Chance(a_Chance),
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
m_Underlying->GetInts(a_MinX, a_MinZ, a_Values);
for (int z = 0; z < SizeZ; z++)
@@ -529,7 +539,7 @@ public:
{
if (a_Values[x + z * SizeX] == bgOcean)
{
- int rnd = super::m_Noise.IntNoise2DInt(a_MinX + x, a_MinZ + z) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(a_MinX + x, a_MinZ + z) / 7;
if (rnd % 1000 < m_Chance)
{
a_Values[x + z * SizeX] = (rnd / 1003) % bgLandOceanMax;
@@ -552,25 +562,26 @@ protected:
/** A filter that adds an edge biome group between two biome groups that need an edge between them. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenBiomeGroupEdges :
+class cIntGenBiomeGroupEdges:
public cIntGen<SizeX, SizeZ>
{
- typedef cIntGen<SizeX, SizeZ> super;
+ using Super = cIntGen<SizeX, SizeZ>;
static const int m_UnderlyingSizeX = SizeX + 2;
static const int m_UnderlyingSizeZ = SizeZ + 2;
public:
- typedef std::shared_ptr<cIntGen<m_UnderlyingSizeX, m_UnderlyingSizeZ>> Underlying;
+ using Underlying = std::shared_ptr<cIntGen<m_UnderlyingSizeX, m_UnderlyingSizeZ>>;
- cIntGenBiomeGroupEdges(Underlying a_Underlying) :
+
+ cIntGenBiomeGroupEdges(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values)
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values)
{
// Generate the underlying biome groups:
int lowerValues[m_UnderlyingSizeX * m_UnderlyingSizeZ];
@@ -653,23 +664,24 @@ protected:
For each pixel, takes its biome group and chooses a random biome from that group; replaces the value with
that biome. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenBiomes :
+class cIntGenBiomes:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
- cIntGenBiomes(int a_Seed, Underlying a_Underlying) :
- super(a_Seed),
+ cIntGenBiomes(int a_Seed, Underlying a_Underlying):
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Define the per-biome-group biomes:
static const int oceanBiomes[] =
@@ -755,7 +767,7 @@ public:
const cBiomesInGroups & Biomes = (val > bgfRare) ?
rareBiomesInGroups[(val & (bgfRare - 1)) % ARRAYCOUNT(rareBiomesInGroups)] :
biomesInGroups[val % ARRAYCOUNT(biomesInGroups)];
- int rnd = (super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7);
+ int rnd = (Super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7);
a_Values[x + IdxZ] = Biomes.Biomes[rnd % Biomes.Count];
}
}
@@ -780,17 +792,18 @@ protected:
/** Randomly replaces pixels of one value to another value, using the given chance. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenReplaceRandomly :
+class cIntGenReplaceRandomly:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
- cIntGenReplaceRandomly(int a_From, int a_To, int a_Chance, int a_Seed, Underlying a_Underlying) :
- super(a_Seed),
+ cIntGenReplaceRandomly(int a_From, int a_To, int a_Chance, int a_Seed, Underlying a_Underlying):
+ Super(a_Seed),
m_From(a_From),
m_To(a_To),
m_Chance(a_Chance),
@@ -799,7 +812,7 @@ public:
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying values:
m_Underlying->GetInts(a_MinX, a_MinZ, a_Values);
@@ -813,7 +826,7 @@ public:
int idx = x + idxZ;
if (a_Values[idx] == m_From)
{
- int rnd = super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7;
if (rnd % 1000 < m_Chance)
{
a_Values[idx] = m_To;
@@ -849,10 +862,11 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenMixRivers:
public cIntGen<SizeX, SizeZ>
{
- typedef cIntGen<SizeX, SizeZ> super;
+ using Super = cIntGen<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
cIntGenMixRivers(Underlying a_Biomes, Underlying a_Rivers):
@@ -862,11 +876,11 @@ public:
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying data:
m_Biomes->GetInts(a_MinX, a_MinZ, a_Values);
- typename super::Values riverData;
+ typename Super::Values riverData;
m_Rivers->GetInts(a_MinX, a_MinZ, riverData);
// Mix the values:
@@ -916,22 +930,24 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenRiver:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
+
static const int UnderlyingSizeX = SizeX + 2;
static const int UnderlyingSizeZ = SizeZ + 2;
public:
- typedef std::shared_ptr<cIntGen<UnderlyingSizeX, UnderlyingSizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<UnderlyingSizeX, UnderlyingSizeZ>>;
cIntGenRiver(int a_Seed, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying data:
int Cache[UnderlyingSizeX * UnderlyingSizeZ];
@@ -975,16 +991,18 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenAddToOcean:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
+
static const int UnderlyingSizeX = SizeX + 2;
static const int UnderlyingSizeZ = SizeZ + 2;
public:
- typedef std::shared_ptr<cIntGen<UnderlyingSizeX, UnderlyingSizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<UnderlyingSizeX, UnderlyingSizeZ>>;
cIntGenAddToOcean(int a_Seed, int a_Chance, int a_ToValue, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Chance(a_Chance),
m_ToValue(a_ToValue),
m_Underlying(a_Underlying)
@@ -992,7 +1010,7 @@ public:
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying data:
int Cache[UnderlyingSizeX * UnderlyingSizeZ];
@@ -1036,7 +1054,7 @@ public:
// If at least 3 ocean neighbors and the chance is right, change:
if (
(NumOceanNeighbors >= 3) &&
- ((super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7) % 1000 < m_Chance)
+ ((Super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7) % 1000 < m_Chance)
)
{
a_Values[x + z * SizeX] = m_ToValue;
@@ -1065,16 +1083,18 @@ protected:
/** Changes random pixels of the underlying data to the specified value. */
template <int SizeX, int SizeZ = SizeX>
-class cIntGenSetRandomly :
+class cIntGenSetRandomly:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
- cIntGenSetRandomly(int a_Seed, int a_Chance, int a_ToValue, Underlying a_Underlying) :
- super(a_Seed),
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
+
+
+ cIntGenSetRandomly(int a_Seed, int a_Chance, int a_ToValue, Underlying a_Underlying):
+ Super(a_Seed),
m_Chance(a_Chance),
m_ToValue(a_ToValue),
m_Underlying(a_Underlying)
@@ -1082,7 +1102,7 @@ public:
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying data:
m_Underlying->GetInts(a_MinX, a_MinZ, a_Values);
@@ -1092,7 +1112,7 @@ public:
{
for (int x = 0; x < SizeX; x++)
{
- int rnd = super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7;
if (rnd % 1000 < m_Chance)
{
a_Values[x + z * SizeX] = m_ToValue;
@@ -1120,21 +1140,22 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenRareBiomeGroups:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
cIntGenRareBiomeGroups(int a_Seed, int a_Chance, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Chance(a_Chance),
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying data:
m_Underlying->GetInts(a_MinX, a_MinZ, a_Values);
@@ -1144,7 +1165,7 @@ public:
{
for (int x = 0; x < SizeX; x++)
{
- int rnd = super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(x + a_MinX, z + a_MinZ) / 7;
if (rnd % 1000 < m_Chance)
{
int idx = x + SizeX * z;
@@ -1172,25 +1193,26 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenAlternateBiomes:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
cIntGenAlternateBiomes(int a_Seed, Underlying a_Alterations, Underlying a_BaseBiomes):
- super(a_Seed),
+ Super(a_Seed),
m_Alterations(a_Alterations),
m_BaseBiomes(a_BaseBiomes)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the base biomes and the alterations:
m_BaseBiomes->GetInts(a_MinX, a_MinZ, a_Values);
- typename super::Values alterations;
+ typename Super::Values alterations;
m_Alterations->GetInts(a_MinX, a_MinZ, alterations);
// Change the biomes into their alternate versions:
@@ -1240,22 +1262,24 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenBiomeEdges:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
+
static const int m_LowerSizeX = SizeX + 2;
static const int m_LowerSizeZ = SizeZ + 2;
public:
- typedef std::shared_ptr<cIntGen<m_LowerSizeX, m_LowerSizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<m_LowerSizeX, m_LowerSizeZ>>;
cIntGenBiomeEdges(int a_Seed, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying biomes:
typename Underlying::element_type::Values lowerValues;
@@ -1402,25 +1426,26 @@ template <int SizeX, int SizeZ = SizeX>
class cIntGenMBiomes:
public cIntGenWithNoise<SizeX, SizeZ>
{
- typedef cIntGenWithNoise<SizeX, SizeZ> super;
+ using Super = cIntGenWithNoise<SizeX, SizeZ>;
public:
- typedef std::shared_ptr<cIntGen<SizeX, SizeZ>> Underlying;
+
+ using Underlying = std::shared_ptr<cIntGen<SizeX, SizeZ>>;
cIntGenMBiomes(int a_Seed, Underlying a_Alteration, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Underlying(a_Underlying),
m_Alteration(a_Alteration)
{
}
- virtual void GetInts(int a_MinX, int a_MinZ, typename super::Values & a_Values) override
+ virtual void GetInts(int a_MinX, int a_MinZ, typename Super::Values & a_Values) override
{
// Generate the underlying biomes and the alterations:
m_Underlying->GetInts(a_MinX, a_MinZ, a_Values);
- typename super::Values alterations;
+ typename Super::Values alterations;
m_Alteration->GetInts(a_MinX, a_MinZ, alterations);
// Wherever alterations are nonzero, change into alternate biome, if available:
diff --git a/src/Generating/MineShafts.cpp b/src/Generating/MineShafts.cpp
index 80ba3f5b5..2045533c1 100644
--- a/src/Generating/MineShafts.cpp
+++ b/src/Generating/MineShafts.cpp
@@ -81,18 +81,19 @@ public:
virtual void ProcessChunk(cChunkDesc & a_ChunkDesc) = 0;
} ;
-typedef std::vector<cMineShaft *> cMineShafts;
+using cMineShafts = std::vector<cMineShaft *>;
-class cMineShaftDirtRoom :
+class cMineShaftDirtRoom:
public cMineShaft
{
- typedef cMineShaft super;
+ using Super = cMineShaft;
public:
+
cMineShaftDirtRoom(cStructGenMineShafts::cMineShaftSystem & a_Parent, cNoise & a_Noise);
// cMineShaft overrides:
@@ -104,16 +105,16 @@ public:
-class cMineShaftCorridor :
+class cMineShaftCorridor:
public cMineShaft
{
- typedef cMineShaft super;
+ using Super = cMineShaft;
public:
+
/** Creates a new Corridor attached to the specified pivot point and direction.
Checks all ParentSystem's objects and disallows intersecting. Initializes the new object to fit.
- May return nullptr if cannot fit.
- */
+ May return nullptr if cannot fit. */
static cMineShaft * CreateAndFit(
cStructGenMineShafts::cMineShaftSystem & a_ParentSystem,
int a_PivotX, int a_PivotY, int a_PivotZ, eDirection a_Direction,
@@ -157,16 +158,16 @@ protected:
-class cMineShaftCrossing :
+class cMineShaftCrossing:
public cMineShaft
{
- typedef cMineShaft super;
+ using Super = cMineShaft;
public:
+
/** Creates a new Crossing attached to the specified pivot point and direction.
Checks all ParentSystem's objects and disallows intersecting. Initializes the new object to fit.
- May return nullptr if cannot fit.
- */
+ May return nullptr if cannot fit. */
static cMineShaft * CreateAndFit(
cStructGenMineShafts::cMineShaftSystem & a_ParentSystem,
int a_PivotX, int a_PivotY, int a_PivotZ, eDirection a_Direction,
@@ -185,12 +186,13 @@ protected:
-class cMineShaftStaircase :
+class cMineShaftStaircase:
public cMineShaft
{
- typedef cMineShaft super;
+ using Super = cMineShaft;
public:
+
enum eSlope
{
sUp,
@@ -228,12 +230,13 @@ protected:
-class cStructGenMineShafts::cMineShaftSystem :
+class cStructGenMineShafts::cMineShaftSystem:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure super;
+ using Super = cGridStructGen::cStructure;
public:
+
int m_GridSize; ///< Maximum offset of the dirtroom from grid center, * 2, in each direction
int m_MaxRecursion; ///< Maximum recursion level (initialized from cStructGenMineShafts::m_MaxRecursion)
int m_ProbLevelCorridor; ///< Probability level of a branch object being the corridor
@@ -283,7 +286,7 @@ cStructGenMineShafts::cMineShaftSystem::cMineShaftSystem(
int a_GridSize, int a_MaxSystemSize, cNoise & a_Noise,
int a_ProbLevelCorridor, int a_ProbLevelCrossing, int a_ProbLevelStaircase
) :
- super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
+ Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_GridSize(a_GridSize),
m_MaxRecursion(8), // TODO: settable
m_ProbLevelCorridor(a_ProbLevelCorridor),
@@ -404,7 +407,7 @@ bool cStructGenMineShafts::cMineShaftSystem::CanAppend(const cCuboid & a_Boundin
// cMineShaftDirtRoom:
cMineShaftDirtRoom::cMineShaftDirtRoom(cStructGenMineShafts::cMineShaftSystem & a_Parent, cNoise & a_Noise) :
- super(a_Parent, mskDirtRoom)
+ Super(a_Parent, mskDirtRoom)
{
// Make the room of random size, min 10 x 4 x 10; max 18 x 12 x 18:
int rnd = a_Noise.IntNoise3DInt(a_Parent.m_OriginX, 0, a_Parent.m_OriginZ) / 7;
@@ -500,7 +503,7 @@ cMineShaftCorridor::cMineShaftCorridor(
const cCuboid & a_BoundingBox, int a_NumSegments, eDirection a_Direction,
cNoise & a_Noise
) :
- super(a_ParentSystem, mskCorridor, a_BoundingBox),
+ Super(a_ParentSystem, mskCorridor, a_BoundingBox),
m_NumSegments(a_NumSegments),
m_Direction(a_Direction),
m_ChestPosition(-1),
@@ -973,7 +976,7 @@ void cMineShaftCorridor::PlaceTorches(cChunkDesc & a_ChunkDesc)
// cMineShaftCrossing:
cMineShaftCrossing::cMineShaftCrossing(cStructGenMineShafts::cMineShaftSystem & a_ParentSystem, const cCuboid & a_BoundingBox) :
- super(a_ParentSystem, mskCrossing, a_BoundingBox)
+ Super(a_ParentSystem, mskCrossing, a_BoundingBox)
{
}
@@ -1113,7 +1116,7 @@ cMineShaftStaircase::cMineShaftStaircase(
eDirection a_Direction,
eSlope a_Slope
) :
- super(a_ParentSystem, mskStaircase, a_BoundingBox),
+ Super(a_ParentSystem, mskStaircase, a_BoundingBox),
m_Direction(a_Direction),
m_Slope(a_Slope)
{
@@ -1289,7 +1292,7 @@ cStructGenMineShafts::cStructGenMineShafts(
int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxSystemSize,
int a_ChanceCorridor, int a_ChanceCrossing, int a_ChanceStaircase
) :
- super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSystemSize, a_MaxSystemSize, 100),
+ Super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSystemSize, a_MaxSystemSize, 100),
m_GridSize(a_GridSize),
m_MaxSystemSize(a_MaxSystemSize),
m_ProbLevelCorridor(std::max(0, a_ChanceCorridor)),
diff --git a/src/Generating/MineShafts.h b/src/Generating/MineShafts.h
index 83f60ec77..43eff2055 100644
--- a/src/Generating/MineShafts.h
+++ b/src/Generating/MineShafts.h
@@ -18,7 +18,7 @@
class cStructGenMineShafts :
public cGridStructGen
{
- typedef cGridStructGen super;
+ typedef cGridStructGen Super;
public:
cStructGenMineShafts(
diff --git a/src/Generating/Noise3DGenerator.h b/src/Generating/Noise3DGenerator.h
index 80e328214..43245bebd 100644
--- a/src/Generating/Noise3DGenerator.h
+++ b/src/Generating/Noise3DGenerator.h
@@ -20,12 +20,13 @@
-class cNoise3DGenerator :
+class cNoise3DGenerator:
public cChunkGenerator
{
- typedef cChunkGenerator Super;
+ using Super = cChunkGenerator;
public:
+
cNoise3DGenerator();
virtual ~cNoise3DGenerator() override;
diff --git a/src/Generating/PieceStructuresGen.cpp b/src/Generating/PieceStructuresGen.cpp
index 4f31c6833..343771a43 100644
--- a/src/Generating/PieceStructuresGen.cpp
+++ b/src/Generating/PieceStructuresGen.cpp
@@ -17,9 +17,10 @@
class cPieceStructuresGen::cGen:
public cGridStructGen
{
- typedef cGridStructGen Super;
+ using Super = cGridStructGen;
public:
+
cGen(int a_Seed, cBiomeGenPtr a_BiomeGen, cTerrainHeightGenPtr a_HeightGen, int a_SeaLevel, const AString & a_Name):
Super(a_Seed),
m_BiomeGen(a_BiomeGen),
diff --git a/src/Generating/PieceStructuresGen.h b/src/Generating/PieceStructuresGen.h
index 1a75c90a6..f0449a9b3 100644
--- a/src/Generating/PieceStructuresGen.h
+++ b/src/Generating/PieceStructuresGen.h
@@ -21,12 +21,13 @@ cPieceGenerator instance.
-class cPieceStructuresGen :
+class cPieceStructuresGen:
public cFinishGen
{
- typedef cFinishGen Super;
+ using Super = cFinishGen;
public:
+
cPieceStructuresGen(int a_Seed);
/** Initializes the generator based on the specified prefab sets.
diff --git a/src/Generating/PrefabStructure.h b/src/Generating/PrefabStructure.h
index 423408396..e102b4863 100644
--- a/src/Generating/PrefabStructure.h
+++ b/src/Generating/PrefabStructure.h
@@ -19,9 +19,10 @@
class cPrefabStructure:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure Super;
+ using Super = cGridStructGen::cStructure;
public:
+
cPrefabStructure(
int a_GridX, int a_GridZ,
int a_OriginX, int a_OriginZ,
diff --git a/src/Generating/ProtIntGen.h b/src/Generating/ProtIntGen.h
index 24cdafa15..22cd35c53 100644
--- a/src/Generating/ProtIntGen.h
+++ b/src/Generating/ProtIntGen.h
@@ -51,7 +51,7 @@ protected:
public:
/** Type of the generic interface used for storing links to the underlying generators. */
- typedef std::shared_ptr<cProtIntGen> Underlying;
+ using Underlying = std::shared_ptr<cProtIntGen>;
/** Force a virtual destructor in all descendants.
@@ -67,13 +67,14 @@ public:
/** Provides additional cNoise member and its helper functions. */
-class cProtIntGenWithNoise :
+class cProtIntGenWithNoise:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
- cProtIntGenWithNoise(int a_Seed) :
+
+ cProtIntGenWithNoise(int a_Seed):
m_Noise(a_Seed)
{
}
@@ -107,14 +108,15 @@ protected:
/** Generates a 2D array of random integers in the specified range [0 .. Range). */
-class cProtIntGenChoice :
+class cProtIntGenChoice:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenChoice(int a_Seed, int a_Range) :
- super(a_Seed),
+
+ cProtIntGenChoice(int a_Seed, int a_Range):
+ Super(a_Seed),
m_Range(a_Range)
{
}
@@ -127,7 +129,7 @@ public:
int BaseZ = a_MinZ + static_cast<int>(z);
for (size_t x = 0; x < a_SizeX; x++)
{
- a_Values[x + a_SizeX * z] = (super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), BaseZ) / 7) % m_Range;
+ a_Values[x + a_SizeX * z] = (Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), BaseZ) / 7) % m_Range;
}
} // for z
}
@@ -143,14 +145,15 @@ protected:
/** Decides between the ocean and landmass biomes.
Has a threshold (in percent) of how much land, the larger the threshold, the more land.
Generates 0 for ocean, biome group ID for landmass. */
-class cProtIntGenLandOcean :
+class cProtIntGenLandOcean:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenLandOcean(int a_Seed, int a_Threshold) :
- super(a_Seed),
+
+ cProtIntGenLandOcean(int a_Seed, int a_Threshold):
+ Super(a_Seed),
m_Threshold(a_Threshold)
{
}
@@ -163,7 +166,7 @@ public:
int BaseZ = a_MinZ + static_cast<int>(z);
for (size_t x = 0; x < a_SizeX; x++)
{
- int rnd = (super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), BaseZ) / 7);
+ int rnd = (Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), BaseZ) / 7);
a_Values[x + a_SizeX * z] = ((rnd % 100) < m_Threshold) ? ((rnd / 101) % bgLandOceanMax + 1) : 0;
}
}
@@ -186,14 +189,15 @@ protected:
/** Zooms the underlying value array to twice the size. Uses random-neighbor for the pixels in-between.
This means that the zoome out image is randomly distorted. Applying zoom several times provides all
the distortion that the generators need. */
-class cProtIntGenZoom :
+class cProtIntGenZoom:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenZoom(int a_Seed, Underlying a_UnderlyingGen) :
- super(a_Seed),
+
+ cProtIntGenZoom(int a_Seed, Underlying a_UnderlyingGen):
+ Super(a_Seed),
m_UnderlyingGen(a_UnderlyingGen)
{
}
@@ -230,9 +234,9 @@ public:
int RndX = (static_cast<int>(x) + lowerMinX) * 2;
int RndZ = (static_cast<int>(z) + lowerMinZ) * 2;
cache[idx] = PrevZ0;
- cache[idx + lowStepX] = super::chooseRandomOne(RndX, RndZ + 1, PrevZ0, PrevZ1);
- cache[idx + 1] = super::chooseRandomOne(RndX, RndZ - 1, PrevZ0, ValX1Z0);
- cache[idx + 1 + lowStepX] = super::chooseRandomOne(RndX, RndZ, PrevZ0, ValX1Z0, PrevZ1, ValX1Z1);
+ cache[idx + lowStepX] = Super::chooseRandomOne(RndX, RndZ + 1, PrevZ0, PrevZ1);
+ cache[idx + 1] = Super::chooseRandomOne(RndX, RndZ - 1, PrevZ0, ValX1Z0);
+ cache[idx + 1 + lowStepX] = Super::chooseRandomOne(RndX, RndZ, PrevZ0, ValX1Z0, PrevZ1, ValX1Z1);
idx += 2;
PrevZ0 = ValX1Z0;
PrevZ1 = ValX1Z1;
@@ -256,14 +260,15 @@ protected:
/** Smoothes out some artifacts generated by the zooming - mostly single-pixel values.
Compares each pixel to its neighbors and if the neighbors are equal, changes the pixel to their value. */
-class cProtIntGenSmooth :
+class cProtIntGenSmooth:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenSmooth(int a_Seed, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenSmooth(int a_Seed, Underlying a_Underlying):
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
@@ -293,7 +298,7 @@ public:
if ((left == right) && (above == below))
{
- if (((super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % 2) == 0)
+ if (((Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % 2) == 0)
{
val = left;
}
@@ -329,13 +334,14 @@ protected:
/** Averages the values of the underlying 2 * 2 neighbors. */
-class cProtIntGenAvgValues :
+class cProtIntGenAvgValues:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
- cProtIntGenAvgValues(Underlying a_Underlying) :
+
+ cProtIntGenAvgValues(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
@@ -373,13 +379,14 @@ protected:
/** Averages the values of the underlying 4 * 4 neighbors. */
-class cProtIntGenAvg4Values :
+class cProtIntGenAvg4Values:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
- cProtIntGenAvg4Values(Underlying a_Underlying) :
+
+ cProtIntGenAvg4Values(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
@@ -423,13 +430,14 @@ protected:
/** Averages the values of the underlying 3 * 3 neighbors with custom weight. */
template <int WeightCenter, int WeightCardinal, int WeightDiagonal>
-class cProtIntGenWeightAvg :
+class cProtIntGenWeightAvg:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
- cProtIntGenWeightAvg(Underlying a_Underlying) :
+
+ cProtIntGenWeightAvg(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
@@ -470,14 +478,15 @@ protected:
/** Replaces random values of the underlying data with random integers in the specified range [Min .. Min + Range). */
-class cProtIntGenRndChoice :
+class cProtIntGenRndChoice:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenRndChoice(int a_Seed, int a_ChancePct, int a_Min, int a_Range, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenRndChoice(int a_Seed, int a_ChancePct, int a_Min, int a_Range, Underlying a_Underlying):
+ Super(a_Seed),
m_ChancePct(a_ChancePct),
m_Min(a_Min),
m_Range(a_Range),
@@ -497,9 +506,9 @@ public:
int BaseZ = a_MinZ + static_cast<int>(z);
for (size_t x = 0; x < a_SizeX; x++)
{
- if (((super::m_Noise.IntNoise2DInt(BaseZ, a_MinX + static_cast<int>(x)) / 13) % 101) < m_ChancePct)
+ if (((Super::m_Noise.IntNoise2DInt(BaseZ, a_MinX + static_cast<int>(x)) / 13) % 101) < m_ChancePct)
{
- a_Values[x + a_SizeX * z] = m_Min + (super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), BaseZ) / 7) % m_Range;
+ a_Values[x + a_SizeX * z] = m_Min + (Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), BaseZ) / 7) % m_Range;
}
} // for x
} // for z
@@ -517,14 +526,15 @@ protected:
/** Adds a random value in range [-a_HalfRange, +a_HalfRange] to each of the underlying values. */
-class cProtIntGenAddRnd :
+class cProtIntGenAddRnd:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenAddRnd(int a_Seed, int a_HalfRange, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenAddRnd(int a_Seed, int a_HalfRange, Underlying a_Underlying):
+ Super(a_Seed),
m_Range(a_HalfRange * 2 + 1),
m_HalfRange(a_HalfRange),
m_Underlying(a_Underlying)
@@ -543,7 +553,7 @@ public:
int NoiseZ = a_MinZ + static_cast<int>(z);
for (size_t x = 0; x < a_SizeX; x++)
{
- int noiseVal = ((super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % m_Range) - m_HalfRange;
+ int noiseVal = ((Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % m_Range) - m_HalfRange;
a_Values[x + z * a_SizeX] += noiseVal;
}
}
@@ -560,14 +570,15 @@ protected:
/** Replaces random underlying values with the average of the neighbors. */
-class cProtIntGenRndAvg :
+class cProtIntGenRndAvg:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenRndAvg(int a_Seed, int a_AvgChancePct, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenRndAvg(int a_Seed, int a_AvgChancePct, Underlying a_Underlying):
+ Super(a_Seed),
m_AvgChancePct(a_AvgChancePct),
m_Underlying(a_Underlying)
{
@@ -590,7 +601,7 @@ public:
for (size_t x = 0; x < a_SizeX; x++)
{
size_t idxLower = x + 1 + lowerSizeX * (z + 1);
- if (((super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % 100) > m_AvgChancePct)
+ if (((Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % 100) > m_AvgChancePct)
{
// Average the 4 neighbors:
a_Values[x + z * a_SizeX] = (
@@ -617,14 +628,15 @@ protected:
/** Replaces random underlying values with a random value in between the max and min of the neighbors. */
-class cProtIntGenRndBetween :
+class cProtIntGenRndBetween:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenRndBetween(int a_Seed, int a_AvgChancePct, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenRndBetween(int a_Seed, int a_AvgChancePct, Underlying a_Underlying):
+ Super(a_Seed),
m_AvgChancePct(a_AvgChancePct),
m_Underlying(a_Underlying)
{
@@ -647,12 +659,12 @@ public:
for (size_t x = 0; x < a_SizeX; x++)
{
size_t idxLower = x + 1 + lowerSizeX * (z + 1);
- if (((super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % 100) > m_AvgChancePct)
+ if (((Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ) / 7) % 100) > m_AvgChancePct)
{
// Chose a value in between the min and max neighbor:
int min = std::min(std::min(lowerData[idxLower - 1], lowerData[idxLower + 1]), std::min(lowerData[idxLower - lowerSizeX], lowerData[idxLower + lowerSizeX]));
int max = std::max(std::max(lowerData[idxLower - 1], lowerData[idxLower + 1]), std::max(lowerData[idxLower - lowerSizeX], lowerData[idxLower + lowerSizeX]));
- a_Values[x + z * a_SizeX] = min + ((super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ + 10) / 7) % (max - min + 1));
+ a_Values[x + z * a_SizeX] = min + ((Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), NoiseZ + 10) / 7) % (max - min + 1));
}
else
{
@@ -673,13 +685,14 @@ protected:
/** Converts land biomes at the edge of an ocean into the respective beach biome. */
-class cProtIntGenBeaches :
+class cProtIntGenBeaches:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
- cProtIntGenBeaches(Underlying a_Underlying) :
+
+ cProtIntGenBeaches(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
@@ -772,17 +785,18 @@ protected:
/** Generates the underlying numbers and then randomly changes some ocean group pixels into random land
biome group pixels, based on the predefined chance. */
-class cProtIntGenAddIslands :
+class cProtIntGenAddIslands:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- typedef std::shared_ptr<cProtIntGen> Underlying;
+ using Underlying = std::shared_ptr<cProtIntGen>;
- cProtIntGenAddIslands(int a_Seed, int a_Chance, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenAddIslands(int a_Seed, int a_Chance, Underlying a_Underlying):
+ Super(a_Seed),
m_Chance(a_Chance),
m_Underlying(a_Underlying)
{
@@ -798,7 +812,7 @@ public:
{
if (a_Values[x + z * a_SizeX] == bgOcean)
{
- int rnd = super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), a_MinZ + static_cast<int>(z)) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(a_MinX + static_cast<int>(x), a_MinZ + static_cast<int>(z)) / 7;
if (rnd % 1000 < m_Chance)
{
a_Values[x + z * a_SizeX] = (rnd / 1003) % bgLandOceanMax;
@@ -820,13 +834,14 @@ protected:
/** A filter that adds an edge biome group between two biome groups that need an edge between them. */
-class cProtIntGenBiomeGroupEdges :
+class cProtIntGenBiomeGroupEdges:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
- cProtIntGenBiomeGroupEdges(Underlying a_Underlying) :
+
+ cProtIntGenBiomeGroupEdges(Underlying a_Underlying):
m_Underlying(a_Underlying)
{
}
@@ -917,14 +932,15 @@ protected:
/** Turns biome group indices into real biomes.
For each pixel, takes its biome group and chooses a random biome from that group; replaces the value with
that biome. */
-class cProtIntGenBiomes :
+class cProtIntGenBiomes:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenBiomes(int a_Seed, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenBiomes(int a_Seed, Underlying a_Underlying):
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
@@ -1017,7 +1033,7 @@ public:
const cBiomesInGroups & Biomes = (val > bgfRare) ?
rareBiomesInGroups[(val & (bgfRare - 1)) % ARRAYCOUNT(rareBiomesInGroups)] :
biomesInGroups[static_cast<size_t>(val) % ARRAYCOUNT(biomesInGroups)];
- int rnd = (super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7);
+ int rnd = (Super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7);
a_Values[x + IdxZ] = Biomes.Biomes[rnd % Biomes.Count];
}
}
@@ -1041,17 +1057,18 @@ protected:
/** Randomly replaces pixels of one value to another value, using the given chance. */
-class cProtIntGenReplaceRandomly :
+class cProtIntGenReplaceRandomly:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- typedef std::shared_ptr<cProtIntGen> Underlying;
+ using Underlying = std::shared_ptr<cProtIntGen>;
- cProtIntGenReplaceRandomly(int a_Seed, int a_From, int a_To, int a_Chance, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenReplaceRandomly(int a_Seed, int a_From, int a_To, int a_Chance, Underlying a_Underlying):
+ Super(a_Seed),
m_From(a_From),
m_To(a_To),
m_Chance(a_Chance),
@@ -1074,7 +1091,7 @@ public:
size_t idx = x + idxZ;
if (a_Values[idx] == m_From)
{
- int rnd = super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7;
if (rnd % 1000 < m_Chance)
{
a_Values[idx] = m_To;
@@ -1109,9 +1126,10 @@ regular river or frozen river, based on the biome. */
class cProtIntGenMixRivers:
public cProtIntGen
{
- typedef cProtIntGen super;
+ using Super = cProtIntGen;
public:
+
cProtIntGenMixRivers(Underlying a_Biomes, Underlying a_Rivers):
m_Biomes(a_Biomes),
m_Rivers(a_Rivers)
@@ -1173,11 +1191,12 @@ data changes from one pixel to its neighbor. */
class cProtIntGenRiver:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
+
cProtIntGenRiver(int a_Seed, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
@@ -1229,11 +1248,12 @@ The biome is only placed if at least 3 of its neighbors are ocean and only with
class cProtIntGenAddToOcean:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
+
cProtIntGenAddToOcean(int a_Seed, int a_Chance, int a_ToValue, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Chance(a_Chance),
m_ToValue(a_ToValue),
m_Underlying(a_Underlying)
@@ -1288,7 +1308,7 @@ public:
// If at least 3 ocean neighbors and the chance is right, change:
if (
(NumOceanNeighbors >= 3) &&
- ((super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7) % 1000 < m_Chance)
+ ((Super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7) % 1000 < m_Chance)
)
{
a_Values[x + z * a_SizeX] = m_ToValue;
@@ -1316,14 +1336,15 @@ protected:
/** Changes random pixels of the underlying data to the specified value. */
-class cProtIntGenSetRandomly :
+class cProtIntGenSetRandomly:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
- cProtIntGenSetRandomly(int a_Seed, int a_Chance, int a_ToValue, Underlying a_Underlying) :
- super(a_Seed),
+
+ cProtIntGenSetRandomly(int a_Seed, int a_Chance, int a_ToValue, Underlying a_Underlying):
+ Super(a_Seed),
m_Chance(a_Chance),
m_ToValue(a_ToValue),
m_Underlying(a_Underlying)
@@ -1341,7 +1362,7 @@ public:
{
for (size_t x = 0; x < a_SizeX; x++)
{
- int rnd = super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7;
if (rnd % 1000 < m_Chance)
{
a_Values[x + z * a_SizeX] = m_ToValue;
@@ -1368,11 +1389,12 @@ protected:
class cProtIntGenRareBiomeGroups:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
+
cProtIntGenRareBiomeGroups(int a_Seed, int a_Chance, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Chance(a_Chance),
m_Underlying(a_Underlying)
{
@@ -1389,7 +1411,7 @@ public:
{
for (size_t x = 0; x < a_SizeX; x++)
{
- int rnd = super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7;
+ int rnd = Super::m_Noise.IntNoise2DInt(static_cast<int>(x) + a_MinX, static_cast<int>(z) + a_MinZ) / 7;
if (rnd % 1000 < m_Chance)
{
size_t idx = x + a_SizeX * z;
@@ -1416,11 +1438,12 @@ that have their alterations set. */
class cProtIntGenAlternateBiomes:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
+
cProtIntGenAlternateBiomes(int a_Seed, Underlying a_Alterations, Underlying a_BaseBiomes):
- super(a_Seed),
+ Super(a_Seed),
m_Alterations(a_Alterations),
m_BaseBiomes(a_BaseBiomes)
{
@@ -1481,11 +1504,12 @@ protected:
class cProtIntGenBiomeEdges:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
+
cProtIntGenBiomeEdges(int a_Seed, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Underlying(a_Underlying)
{
}
@@ -1640,11 +1664,12 @@ have their alterations set. */
class cProtIntGenMBiomes:
public cProtIntGenWithNoise
{
- typedef cProtIntGenWithNoise super;
+ using Super = cProtIntGenWithNoise;
public:
+
cProtIntGenMBiomes(int a_Seed, Underlying a_Alteration, Underlying a_Underlying):
- super(a_Seed),
+ Super(a_Seed),
m_Underlying(a_Underlying),
m_Alteration(a_Alteration)
{
diff --git a/src/Generating/Ravines.cpp b/src/Generating/Ravines.cpp
index f1d5fdb23..a9574a8b7 100644
--- a/src/Generating/Ravines.cpp
+++ b/src/Generating/Ravines.cpp
@@ -33,16 +33,16 @@ struct cRavDefPoint
}
} ;
-typedef std::vector<cRavDefPoint> cRavDefPoints;
+using cRavDefPoints = std::vector<cRavDefPoint>;
-class cStructGenRavines::cRavine :
+class cStructGenRavines::cRavine:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure super;
+ using Super = cGridStructGen::cStructure;
cRavDefPoints m_Points;
@@ -81,7 +81,7 @@ protected:
// cStructGenRavines:
cStructGenRavines::cStructGenRavines(int a_Seed, int a_Size) :
- super(a_Seed, a_Size, a_Size, a_Size, a_Size, a_Size * 2, a_Size * 2, 100),
+ Super(a_Seed, a_Size, a_Size, a_Size, a_Size, a_Size * 2, a_Size * 2, 100),
m_Size(a_Size)
{
}
@@ -103,7 +103,7 @@ cGridStructGen::cStructurePtr cStructGenRavines::CreateStructure(int a_GridX, in
// cStructGenRavines::cRavine
cStructGenRavines::cRavine::cRavine(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ, int a_Size, cNoise & a_Noise) :
- super(a_GridX, a_GridZ, a_OriginX, a_OriginZ)
+ Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ)
{
// Calculate the ravine shape-defining points:
GenerateBaseDefPoints(a_OriginX, a_OriginZ, a_Size, a_Noise);
diff --git a/src/Generating/Ravines.h b/src/Generating/Ravines.h
index bcfdcc0d2..d1d0e0076 100644
--- a/src/Generating/Ravines.h
+++ b/src/Generating/Ravines.h
@@ -15,18 +15,19 @@
-class cStructGenRavines :
+class cStructGenRavines:
public cGridStructGen
{
- typedef cGridStructGen super;
+ using Super = cGridStructGen;
public:
+
cStructGenRavines(int a_Seed, int a_Size);
protected:
class cRavine; // fwd: Ravines.cpp
- int m_Size; // Max size, in blocks, of the ravines generated
+ int m_Size; // Max size, in blocks, of the ravines generated
// cGridStructGen overrides:
diff --git a/src/Generating/RoughRavines.cpp b/src/Generating/RoughRavines.cpp
index a65f57268..fe425757f 100644
--- a/src/Generating/RoughRavines.cpp
+++ b/src/Generating/RoughRavines.cpp
@@ -15,20 +15,21 @@
////////////////////////////////////////////////////////////////////////////////
// cRoughRavine:
-class cRoughRavine :
+class cRoughRavine:
public cGridStructGen::cStructure
{
- typedef cGridStructGen::cStructure super;
+ using Super = cGridStructGen::cStructure;
public:
+
cRoughRavine(
int a_Seed, size_t a_Size,
float a_CenterWidth, float a_Roughness,
float a_FloorHeightEdge1, float a_FloorHeightEdge2, float a_FloorHeightCenter,
float a_CeilingHeightEdge1, float a_CeilingHeightEdge2, float a_CeilingHeightCenter,
int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ
- ) :
- super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
+ ):
+ Super(a_GridX, a_GridZ, a_OriginX, a_OriginZ),
m_Seed(a_Seed + 100),
m_Noise(a_Seed + 100),
m_Roughness(a_Roughness)
@@ -72,7 +73,7 @@ protected:
m_Bottom = a_Bottom;
}
};
- typedef std::vector<sRavineDefPoint> sRavineDefPoints;
+ using sRavineDefPoints = std::vector<sRavineDefPoint>;
int m_Seed;
@@ -231,7 +232,7 @@ cRoughRavines::cRoughRavines(
float a_MaxCeilingHeightCenter, float a_MinCeilingHeightCenter,
int a_GridSize, int a_MaxOffset
) :
- super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 64),
+ Super(a_Seed, a_GridSize, a_GridSize, a_MaxOffset, a_MaxOffset, a_MaxSize, a_MaxSize, 64),
m_MaxSize(a_MaxSize),
m_MinSize(a_MinSize),
m_MaxCenterWidth(a_MaxCenterWidth),
diff --git a/src/Generating/RoughRavines.h b/src/Generating/RoughRavines.h
index b326d7345..88b2f2e6d 100644
--- a/src/Generating/RoughRavines.h
+++ b/src/Generating/RoughRavines.h
@@ -14,12 +14,13 @@
-class cRoughRavines :
+class cRoughRavines:
public cGridStructGen
{
- typedef cGridStructGen super;
+ using Super = cGridStructGen;
public:
+
cRoughRavines(
int a_Seed,
int a_MaxSize, int a_MinSize,
diff --git a/src/Generating/TwoHeights.cpp b/src/Generating/TwoHeights.cpp
index dd05fe835..15c48eb26 100644
--- a/src/Generating/TwoHeights.cpp
+++ b/src/Generating/TwoHeights.cpp
@@ -17,8 +17,10 @@
class cTwoHeights:
public cTerrainShapeGen
{
- typedef cTerrainShapeGen super;
+ using Super = cTerrainShapeGen;
+
public:
+
cTwoHeights(int a_Seed, cBiomeGenPtr a_BiomeGen):
m_Seed(a_Seed),
m_Choice(a_Seed),
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),
diff --git a/src/Generating/VillageGen.h b/src/Generating/VillageGen.h
index 9de8552b1..42c5b7bb0 100644
--- a/src/Generating/VillageGen.h
+++ b/src/Generating/VillageGen.h
@@ -23,11 +23,13 @@ class cVillagePiecePool;
-class cVillageGen :
+class cVillageGen:
public cGridStructGen
{
- typedef cGridStructGen super;
+ using Super = cGridStructGen;
+
public:
+
/** Creates a new instance of the generator with the specified parameters. */
cVillageGen(
int a_Seed,
diff --git a/src/HTTP/HTTPMessage.cpp b/src/HTTP/HTTPMessage.cpp
index 0ba069e3a..827842ef9 100644
--- a/src/HTTP/HTTPMessage.cpp
+++ b/src/HTTP/HTTPMessage.cpp
@@ -70,7 +70,7 @@ void cHTTPMessage::AddHeader(const AString & a_Key, const AString & a_Value)
// cHTTPOutgoingResponse:
cHTTPOutgoingResponse::cHTTPOutgoingResponse(void) :
- super(mkResponse)
+ Super(mkResponse)
{
}
diff --git a/src/HTTP/HTTPMessage.h b/src/HTTP/HTTPMessage.h
index be767a55a..20deab5ab 100644
--- a/src/HTTP/HTTPMessage.h
+++ b/src/HTTP/HTTPMessage.h
@@ -43,7 +43,9 @@ public:
size_t GetContentLength(void) const { return m_ContentLength; }
protected:
- typedef std::map<AString, AString> cNameValueMap;
+
+ using cNameValueMap = std::map<AString, AString>;
+
eKind m_Kind;
@@ -64,12 +66,13 @@ protected:
/** Stores outgoing response headers and serializes them to an HTTP data stream. */
-class cHTTPOutgoingResponse :
+class cHTTPOutgoingResponse:
public cHTTPMessage
{
- typedef cHTTPMessage super;
+ using Super = cHTTPMessage;
public:
+
cHTTPOutgoingResponse(void);
/** Appends the response to the specified datastream - response line and headers.
@@ -85,8 +88,10 @@ public:
class cHTTPIncomingRequest:
public cHTTPMessage
{
- typedef cHTTPMessage Super;
+ using Super = cHTTPMessage;
+
public:
+
/** Base class for anything that can be used as the UserData for the request. */
class cUserData
{
@@ -94,7 +99,7 @@ public:
// Force a virtual destructor in descendants:
virtual ~cUserData() {}
};
- typedef std::shared_ptr<cUserData> cUserDataPtr;
+ using cUserDataPtr = std::shared_ptr<cUserData>;
/** Creates a new instance of the class, containing the method and URL provided by the client. */
diff --git a/src/HTTP/SslHTTPServerConnection.cpp b/src/HTTP/SslHTTPServerConnection.cpp
index 9c2993fbb..4f1ef81d2 100644
--- a/src/HTTP/SslHTTPServerConnection.cpp
+++ b/src/HTTP/SslHTTPServerConnection.cpp
@@ -12,7 +12,7 @@
cSslHTTPServerConnection::cSslHTTPServerConnection(cHTTPServer & a_HTTPServer, std::shared_ptr<const cSslConfig> a_Config):
- super(a_HTTPServer),
+ Super(a_HTTPServer),
m_Ssl(64000)
{
if (a_Config != nullptr)
@@ -59,7 +59,7 @@ void cSslHTTPServerConnection::OnReceivedData(const char * a_Data, size_t a_Size
int NumRead = m_Ssl.ReadPlain(Buffer, sizeof(Buffer));
if (NumRead > 0)
{
- super::OnReceivedData(Buffer, static_cast<size_t>(NumRead));
+ Super::OnReceivedData(Buffer, static_cast<size_t>(NumRead));
// The link may have closed while processing the data, bail out:
return;
}
diff --git a/src/HTTP/SslHTTPServerConnection.h b/src/HTTP/SslHTTPServerConnection.h
index 3ea62c3d9..ae15398bf 100644
--- a/src/HTTP/SslHTTPServerConnection.h
+++ b/src/HTTP/SslHTTPServerConnection.h
@@ -16,12 +16,13 @@
-class cSslHTTPServerConnection :
+class cSslHTTPServerConnection:
public cHTTPServerConnection
{
- typedef cHTTPServerConnection super;
+ using Super = cHTTPServerConnection;
public:
+
/** Creates a new connection on the specified server.
Sends the specified cert as the server certificate, uses the private key for decryption. */
cSslHTTPServerConnection(cHTTPServer & a_HTTPServer, std::shared_ptr<const cSslConfig> a_Config);
diff --git a/src/HTTP/TransferEncodingParser.cpp b/src/HTTP/TransferEncodingParser.cpp
index a14900e9c..98d870460 100644
--- a/src/HTTP/TransferEncodingParser.cpp
+++ b/src/HTTP/TransferEncodingParser.cpp
@@ -18,9 +18,10 @@ class cChunkedTEParser:
public cTransferEncodingParser,
public cEnvelopeParser::cCallbacks
{
- typedef cTransferEncodingParser Super;
+ using Super = cTransferEncodingParser;
public:
+
cChunkedTEParser(Super::cCallbacks & a_Callbacks):
Super(a_Callbacks),
m_State(psChunkLength),
@@ -318,9 +319,10 @@ protected:
class cIdentityTEParser:
public cTransferEncodingParser
{
- typedef cTransferEncodingParser Super;
+ using Super = cTransferEncodingParser;
public:
+
cIdentityTEParser(cCallbacks & a_Callbacks, size_t a_ContentLength):
Super(a_Callbacks),
m_BytesLeft(a_ContentLength)
diff --git a/src/HTTP/UrlClient.cpp b/src/HTTP/UrlClient.cpp
index c6ac69c32..9ee453321 100644
--- a/src/HTTP/UrlClient.cpp
+++ b/src/HTTP/UrlClient.cpp
@@ -243,9 +243,10 @@ class cHttpSchemeHandler:
public cSchemeHandler,
protected cHTTPMessageParser::cCallbacks
{
- typedef cSchemeHandler Super;
+ using Super = cSchemeHandler;
public:
+
cHttpSchemeHandler(cUrlClientRequest & a_ParentRequest, bool a_IsTls):
Super(a_ParentRequest),
m_Parser(*this),
diff --git a/src/IniFile.h b/src/IniFile.h
index 057691cba..772d6a967 100644
--- a/src/IniFile.h
+++ b/src/IniFile.h
@@ -30,10 +30,14 @@
// tolua_begin
-class cIniFile : public cSettingsRepositoryInterface
+class cIniFile:
+ public cSettingsRepositoryInterface
{
private:
- typedef cSettingsRepositoryInterface Super;
+
+ // tolua_end
+
+ using Super = cSettingsRepositoryInterface;
bool m_IsCaseInsensitive;
@@ -57,6 +61,8 @@ private:
/** Removes the UTF-8 BOMs (Byte order makers), if present. */
void RemoveBom(AString & a_line) const;
+ // tolua_begin
+
public:
// NOTE: This has to be present for ToLua++'s parser to output the noID constant into the API
diff --git a/src/Items/ItemAxe.h b/src/Items/ItemAxe.h
index 3b981ef7c..cee41989d 100644
--- a/src/Items/ItemAxe.h
+++ b/src/Items/ItemAxe.h
@@ -8,13 +8,15 @@
-class cItemAxeHandler :
+class cItemAxeHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
- cItemAxeHandler(int a_ItemType)
- : cItemHandler(a_ItemType)
+
+ cItemAxeHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -37,7 +39,7 @@ public:
{
if (!IsBlockMaterialWood(a_Block) && !IsBlockMaterialPlants(a_Block) && !IsBlockMaterialVine(a_Block))
{
- return super::GetBlockBreakingStrength(a_Block);
+ return Super::GetBlockBreakingStrength(a_Block);
}
else
{
diff --git a/src/Items/ItemBigFlower.h b/src/Items/ItemBigFlower.h
index 8e96ad602..81a9d3818 100644
--- a/src/Items/ItemBigFlower.h
+++ b/src/Items/ItemBigFlower.h
@@ -11,11 +11,12 @@
class cItemBigFlowerHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
+
cItemBigFlowerHandler(void):
- super(E_BLOCK_BIG_FLOWER)
+ Super(E_BLOCK_BIG_FLOWER)
{
}
diff --git a/src/Items/ItemBoat.h b/src/Items/ItemBoat.h
index ea95e6a47..682b68ff2 100644
--- a/src/Items/ItemBoat.h
+++ b/src/Items/ItemBoat.h
@@ -8,14 +8,15 @@
-class cItemBoatHandler :
+class cItemBoatHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemBoatHandler(int a_ItemType) :
- super(a_ItemType)
+
+ cItemBoatHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h
index 53a1373b7..81f012c7c 100644
--- a/src/Items/ItemBow.h
+++ b/src/Items/ItemBow.h
@@ -8,14 +8,15 @@
-class cItemBowHandler :
+class cItemBowHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemBowHandler(void) :
- super(E_ITEM_BOW)
+
+ cItemBowHandler(void):
+ Super(E_ITEM_BOW)
{
}
diff --git a/src/Items/ItemChest.h b/src/Items/ItemChest.h
index ac4e4b471..b8807e5d8 100644
--- a/src/Items/ItemChest.h
+++ b/src/Items/ItemChest.h
@@ -12,10 +12,12 @@
class cItemChestHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
+
cItemChestHandler(int a_ItemType):
- super(a_ItemType)
+ Super(a_ItemType)
{
}
diff --git a/src/Items/ItemCookedFish.h b/src/Items/ItemCookedFish.h
index 8a819c6f6..d0edc2d6a 100644
--- a/src/Items/ItemCookedFish.h
+++ b/src/Items/ItemCookedFish.h
@@ -7,14 +7,15 @@
-class cItemCookedFishHandler :
+class cItemCookedFishHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemCookedFishHandler()
- : super(E_ITEM_COOKED_FISH, FoodInfo(0, 0))
+
+ cItemCookedFishHandler():
+ Super(E_ITEM_COOKED_FISH, FoodInfo(0, 0))
{
}
diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h
index 839982d74..890fcc9db 100644
--- a/src/Items/ItemDye.h
+++ b/src/Items/ItemDye.h
@@ -13,11 +13,11 @@
class cItemDyeHandler :
public cItemHandler
{
- using super = cItemHandler;
+ using Super = cItemHandler;
public:
cItemDyeHandler(int a_ItemType):
- super(a_ItemType)
+ Super(a_ItemType)
{
}
diff --git a/src/Items/ItemEmptyMap.h b/src/Items/ItemEmptyMap.h
index bb796d892..fe7b03e23 100644
--- a/src/Items/ItemEmptyMap.h
+++ b/src/Items/ItemEmptyMap.h
@@ -7,16 +7,17 @@
-class cItemEmptyMapHandler :
+class cItemEmptyMapHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
static const unsigned int DEFAULT_SCALE = 0;
public:
- cItemEmptyMapHandler() :
- super(E_ITEM_EMPTY_MAP)
+
+ cItemEmptyMapHandler():
+ Super(E_ITEM_EMPTY_MAP)
{
}
diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h
index 8c2be3ad3..48568ed69 100644
--- a/src/Items/ItemFishingRod.h
+++ b/src/Items/ItemFishingRod.h
@@ -49,14 +49,15 @@ protected:
-class cItemFishingRodHandler :
+class cItemFishingRodHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemFishingRodHandler(int a_ItemType) :
- super(a_ItemType)
+
+ cItemFishingRodHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
diff --git a/src/Items/ItemFood.h b/src/Items/ItemFood.h
index f8137ab6f..29d733cab 100644
--- a/src/Items/ItemFood.h
+++ b/src/Items/ItemFood.h
@@ -7,14 +7,15 @@
-class cItemFoodHandler :
+class cItemFoodHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemFoodHandler(int a_ItemType, FoodInfo a_FoodInfo)
- : super(a_ItemType),
+
+ cItemFoodHandler(int a_ItemType, FoodInfo a_FoodInfo):
+ Super(a_ItemType),
m_FoodInfo(a_FoodInfo)
{
}
@@ -33,7 +34,7 @@ public:
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemFoodSeeds.h b/src/Items/ItemFoodSeeds.h
index 802397375..89d05287d 100644
--- a/src/Items/ItemFoodSeeds.h
+++ b/src/Items/ItemFoodSeeds.h
@@ -8,14 +8,15 @@
-class cItemFoodSeedsHandler :
+class cItemFoodSeedsHandler:
public cItemSeedsHandler
{
- typedef cItemSeedsHandler super;
+ using Super = cItemSeedsHandler;
public:
- cItemFoodSeedsHandler(int a_ItemType, FoodInfo a_FoodInfo) :
- cItemSeedsHandler(a_ItemType),
+
+ cItemFoodSeedsHandler(int a_ItemType, FoodInfo a_FoodInfo):
+ Super(a_ItemType),
m_FoodInfo(a_FoodInfo)
{
@@ -35,7 +36,7 @@ public:
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemGoldenApple.h b/src/Items/ItemGoldenApple.h
index cece9a54a..e01335dd4 100644
--- a/src/Items/ItemGoldenApple.h
+++ b/src/Items/ItemGoldenApple.h
@@ -7,14 +7,15 @@
-class cItemGoldenAppleHandler :
+class cItemGoldenAppleHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemGoldenAppleHandler()
- : super(E_ITEM_GOLDEN_APPLE, FoodInfo(4, 9.6))
+
+ cItemGoldenAppleHandler():
+ Super(E_ITEM_GOLDEN_APPLE, FoodInfo(4, 9.6))
{
}
diff --git a/src/Items/ItemLeaves.h b/src/Items/ItemLeaves.h
index 57f1fa365..59cc1429d 100644
--- a/src/Items/ItemLeaves.h
+++ b/src/Items/ItemLeaves.h
@@ -7,14 +7,15 @@
-class cItemLeavesHandler :
+class cItemLeavesHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemLeavesHandler(int a_ItemType)
- : cItemHandler(a_ItemType)
+
+ cItemLeavesHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -25,7 +26,7 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
- bool res = super::GetPlacementBlockTypeMeta(
+ bool res = Super::GetPlacementBlockTypeMeta(
a_World, a_Player,
a_BlockX, a_BlockY, a_BlockZ, a_BlockFace,
a_CursorX, a_CursorY, a_CursorZ,
diff --git a/src/Items/ItemLilypad.h b/src/Items/ItemLilypad.h
index 7f3b85a70..985da3ed5 100644
--- a/src/Items/ItemLilypad.h
+++ b/src/Items/ItemLilypad.h
@@ -9,14 +9,15 @@
-class cItemLilypadHandler :
+class cItemLilypadHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
+
cItemLilypadHandler(int a_ItemType):
- super(a_ItemType)
+ Super(a_ItemType)
{
}
diff --git a/src/Items/ItemMap.h b/src/Items/ItemMap.h
index 203e11fbb..2d939676a 100644
--- a/src/Items/ItemMap.h
+++ b/src/Items/ItemMap.h
@@ -7,16 +7,17 @@
-class cItemMapHandler :
+class cItemMapHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
static const unsigned int DEFAULT_RADIUS = 128;
public:
- cItemMapHandler() :
- super(E_ITEM_MAP)
+
+ cItemMapHandler():
+ Super(E_ITEM_MAP)
{
}
diff --git a/src/Items/ItemMilk.h b/src/Items/ItemMilk.h
index 94fa51d09..e34efbc0f 100644
--- a/src/Items/ItemMilk.h
+++ b/src/Items/ItemMilk.h
@@ -8,10 +8,12 @@
class cItemMilkHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
+
cItemMilkHandler():
- super(E_ITEM_MILK)
+ Super(E_ITEM_MILK)
{
}
diff --git a/src/Items/ItemMinecart.h b/src/Items/ItemMinecart.h
index 55a39c5ce..603d3f9c5 100644
--- a/src/Items/ItemMinecart.h
+++ b/src/Items/ItemMinecart.h
@@ -7,14 +7,15 @@
-class cItemMinecartHandler :
+class cItemMinecartHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemMinecartHandler(int a_ItemType) :
- super(a_ItemType)
+
+ cItemMinecartHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
diff --git a/src/Items/ItemMobHead.h b/src/Items/ItemMobHead.h
index 747492402..d732327a5 100644
--- a/src/Items/ItemMobHead.h
+++ b/src/Items/ItemMobHead.h
@@ -9,14 +9,15 @@
-class cItemMobHeadHandler :
+class cItemMobHeadHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemMobHeadHandler(int a_ItemType) :
- super(a_ItemType)
+
+ cItemMobHeadHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -46,7 +47,7 @@ public:
}
cItem itemCopy(a_EquippedItem); // Make a copy in case this is the player's last head item and OnPlayerPlace removes it
- if (!super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ))
+ if (!Super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ))
{
return false;
}
diff --git a/src/Items/ItemPickaxe.h b/src/Items/ItemPickaxe.h
index fd3532729..9172146b7 100644
--- a/src/Items/ItemPickaxe.h
+++ b/src/Items/ItemPickaxe.h
@@ -5,13 +5,15 @@
-class cItemPickaxeHandler :
+class cItemPickaxeHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
- cItemPickaxeHandler(int a_ItemType)
- : cItemHandler(a_ItemType)
+
+ cItemPickaxeHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -150,7 +152,7 @@ public:
return PickaxeLevel() >= 1;
}
}
- return super::CanHarvestBlock(a_BlockType);
+ return Super::CanHarvestBlock(a_BlockType);
}
virtual bool CanRepairWithRawMaterial(short a_ItemType) override
@@ -171,7 +173,7 @@ public:
{
if (!IsBlockMaterialIron(a_Block) && (a_Block != E_BLOCK_ANVIL) && !IsBlockMaterialRock(a_Block))
{
- return super::GetBlockBreakingStrength(a_Block);
+ return Super::GetBlockBreakingStrength(a_Block);
}
else
{
diff --git a/src/Items/ItemPoisonousPotato.h b/src/Items/ItemPoisonousPotato.h
index 8d2dd93e7..1950db90e 100644
--- a/src/Items/ItemPoisonousPotato.h
+++ b/src/Items/ItemPoisonousPotato.h
@@ -7,20 +7,21 @@
-class cItemPoisonousPotatoHandler :
+class cItemPoisonousPotatoHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemPoisonousPotatoHandler()
- : super(E_ITEM_POISONOUS_POTATO, FoodInfo(2, 1.2))
+
+ cItemPoisonousPotatoHandler():
+ Super(E_ITEM_POISONOUS_POTATO, FoodInfo(2, 1.2))
{
}
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h
index 86330d1c0..49fbfa0dd 100644
--- a/src/Items/ItemPotion.h
+++ b/src/Items/ItemPotion.h
@@ -7,12 +7,12 @@
class cItemPotionHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
cItemPotionHandler():
- super(E_ITEM_POTION)
+ Super(E_ITEM_POTION)
{
}
diff --git a/src/Items/ItemPumpkin.h b/src/Items/ItemPumpkin.h
index d124265c7..b8038093c 100644
--- a/src/Items/ItemPumpkin.h
+++ b/src/Items/ItemPumpkin.h
@@ -10,11 +10,12 @@
class cItemPumpkinHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemPumpkinHandler(void):
- super(E_BLOCK_PUMPKIN)
+
+ cItemPumpkinHandler():
+ Super(E_BLOCK_PUMPKIN)
{
}
@@ -38,7 +39,7 @@ public:
}
// No golem at these coords, place the block normally:
- return super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
+ return Super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
}
diff --git a/src/Items/ItemRawChicken.h b/src/Items/ItemRawChicken.h
index e1a6d4870..95acd3194 100644
--- a/src/Items/ItemRawChicken.h
+++ b/src/Items/ItemRawChicken.h
@@ -7,20 +7,21 @@
-class cItemRawChickenHandler :
+class cItemRawChickenHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemRawChickenHandler()
- : super(E_ITEM_RAW_CHICKEN, FoodInfo(2, 1.2))
+
+ cItemRawChickenHandler():
+ Super(E_ITEM_RAW_CHICKEN, FoodInfo(2, 1.2))
{
}
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemRawFish.h b/src/Items/ItemRawFish.h
index 7f9f49e2a..22836272f 100644
--- a/src/Items/ItemRawFish.h
+++ b/src/Items/ItemRawFish.h
@@ -7,14 +7,15 @@
-class cItemRawFishHandler :
+class cItemRawFishHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemRawFishHandler()
- : super(E_ITEM_RAW_FISH, FoodInfo(0, 0))
+
+ cItemRawFishHandler():
+ Super(E_ITEM_RAW_FISH, FoodInfo(0, 0))
{
}
@@ -38,7 +39,7 @@ public:
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemRottenFlesh.h b/src/Items/ItemRottenFlesh.h
index a4b34e8bc..bd7f67382 100644
--- a/src/Items/ItemRottenFlesh.h
+++ b/src/Items/ItemRottenFlesh.h
@@ -7,20 +7,21 @@
-class cItemRottenFleshHandler :
+class cItemRottenFleshHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemRottenFleshHandler()
- : super(E_ITEM_ROTTEN_FLESH, FoodInfo(4, 0.8))
+
+ cItemRottenFleshHandler():
+ Super(E_ITEM_ROTTEN_FLESH, FoodInfo(4, 0.8))
{
}
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemSapling.h b/src/Items/ItemSapling.h
index dbcb12be5..e8deb37a9 100644
--- a/src/Items/ItemSapling.h
+++ b/src/Items/ItemSapling.h
@@ -7,13 +7,15 @@
-class cItemSaplingHandler : public cItemHandler
+class cItemSaplingHandler:
+ public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
- cItemSaplingHandler(int a_ItemType)
- : cItemHandler(a_ItemType)
+
+ cItemSaplingHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -25,7 +27,7 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) override
{
- bool res = super::GetPlacementBlockTypeMeta(
+ bool res = Super::GetPlacementBlockTypeMeta(
a_World, a_Player,
a_BlockX, a_BlockY, a_BlockZ, a_BlockFace,
a_CursorX, a_CursorY, a_CursorZ,
diff --git a/src/Items/ItemShears.h b/src/Items/ItemShears.h
index 2ceb371f4..a100a52a3 100644
--- a/src/Items/ItemShears.h
+++ b/src/Items/ItemShears.h
@@ -9,13 +9,15 @@
-class cItemShearsHandler :
+class cItemShearsHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
- cItemShearsHandler(int a_ItemType) :
- cItemHandler(a_ItemType)
+
+ cItemShearsHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -57,7 +59,7 @@ public:
return true;
}
}
- return super::CanHarvestBlock(a_BlockType);
+ return Super::CanHarvestBlock(a_BlockType);
}
@@ -88,7 +90,7 @@ public:
}
else
{
- return super::GetBlockBreakingStrength(a_Block);
+ return Super::GetBlockBreakingStrength(a_Block);
}
}
diff --git a/src/Items/ItemShovel.h b/src/Items/ItemShovel.h
index 0715f8d99..1459a14ac 100644
--- a/src/Items/ItemShovel.h
+++ b/src/Items/ItemShovel.h
@@ -12,12 +12,15 @@
-class cItemShovelHandler : public cItemHandler
+class cItemShovelHandler:
+ public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
- cItemShovelHandler(int a_ItemType)
- : cItemHandler(a_ItemType)
+
+ cItemShovelHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -44,7 +47,7 @@ public:
{
return true;
}
- return super::CanHarvestBlock(a_BlockType);
+ return Super::CanHarvestBlock(a_BlockType);
}
@@ -96,6 +99,6 @@ public:
break;
}
}
- return super::GetBlockBreakingStrength(a_Block);
+ return Super::GetBlockBreakingStrength(a_Block);
}
};
diff --git a/src/Items/ItemSign.h b/src/Items/ItemSign.h
index 37ad4967b..21acd81ae 100644
--- a/src/Items/ItemSign.h
+++ b/src/Items/ItemSign.h
@@ -11,13 +11,15 @@
-class cItemSignHandler :
+class cItemSignHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
- cItemSignHandler(int a_ItemType) :
- super(a_ItemType)
+
+ cItemSignHandler(int a_ItemType):
+ Super(a_ItemType)
{
}
@@ -36,7 +38,7 @@ public:
bool isReplacingClickedBlock = BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision(ChunkInterface, { a_BlockX, a_BlockY, a_BlockZ }, a_Player, ClickedBlockMeta);
// If the regular placement doesn't work, do no further processing:
- if (!super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ))
+ if (!Super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ))
{
return false;
}
diff --git a/src/Items/ItemSlab.h b/src/Items/ItemSlab.h
index ff83c0367..0c7654113 100644
--- a/src/Items/ItemSlab.h
+++ b/src/Items/ItemSlab.h
@@ -10,14 +10,14 @@
class cItemSlabHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
public:
/** Creates a new handler for the specified slab item type.
Sets the handler to use the specified doubleslab block type for combining self into doubleslabs. */
cItemSlabHandler(int a_ItemType, BLOCKTYPE a_DoubleSlabBlockType):
- super(a_ItemType),
+ Super(a_ItemType),
m_DoubleSlabBlockType(a_DoubleSlabBlockType)
{
}
@@ -99,7 +99,7 @@ public:
// The slabs didn't combine, use the default handler to place the slab:
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, true);
- bool res = super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
+ bool res = Super::OnPlayerPlace(a_World, a_Player, a_EquippedItem, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ);
/*
The client has a bug when a slab replaces snow and there's a slab above it.
diff --git a/src/Items/ItemSoup.h b/src/Items/ItemSoup.h
index 958c0e0ea..60a2f8d76 100644
--- a/src/Items/ItemSoup.h
+++ b/src/Items/ItemSoup.h
@@ -8,14 +8,15 @@
-class cItemSoupHandler :
+class cItemSoupHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemSoupHandler(int a_ItemType, FoodInfo a_FoodInfo) :
- super(a_ItemType, a_FoodInfo)
+
+ cItemSoupHandler(int a_ItemType, FoodInfo a_FoodInfo):
+ Super(a_ItemType, a_FoodInfo)
{
}
diff --git a/src/Items/ItemSpiderEye.h b/src/Items/ItemSpiderEye.h
index 901f5d3d0..df371a010 100644
--- a/src/Items/ItemSpiderEye.h
+++ b/src/Items/ItemSpiderEye.h
@@ -7,20 +7,21 @@
-class cItemSpiderEyeHandler :
+class cItemSpiderEyeHandler:
public cItemFoodHandler
{
- typedef cItemFoodHandler super;
+ using Super = cItemFoodHandler;
public:
- cItemSpiderEyeHandler()
- : super(E_ITEM_SPIDER_EYE, FoodInfo(2, 3.2))
+
+ cItemSpiderEyeHandler():
+ Super(E_ITEM_SPIDER_EYE, FoodInfo(2, 3.2))
{
}
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
- if (!super::EatItem(a_Player, a_Item))
+ if (!Super::EatItem(a_Player, a_Item))
{
return false;
}
diff --git a/src/Items/ItemSword.h b/src/Items/ItemSword.h
index cdb85727c..cb2e63c87 100644
--- a/src/Items/ItemSword.h
+++ b/src/Items/ItemSword.h
@@ -8,13 +8,15 @@
-class cItemSwordHandler :
+class cItemSwordHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
+
cItemSwordHandler(int a_ItemType):
- cItemHandler(a_ItemType)
+ Super(a_ItemType)
{
}
@@ -25,7 +27,7 @@ public:
{
return true;
}
- return super::CanHarvestBlock(a_BlockType);
+ return Super::CanHarvestBlock(a_BlockType);
}
diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h
index 528799630..daae7658c 100644
--- a/src/Items/ItemThrowable.h
+++ b/src/Items/ItemThrowable.h
@@ -7,13 +7,15 @@
-class cItemThrowableHandler :
+class cItemThrowableHandler:
public cItemHandler
{
- typedef cItemHandler super;
+ using Super = cItemHandler;
+
public:
- cItemThrowableHandler(int a_ItemType, cProjectileEntity::eKind a_ProjectileKind, double a_SpeedCoeff) :
- super(a_ItemType),
+
+ cItemThrowableHandler(int a_ItemType, cProjectileEntity::eKind a_ProjectileKind, double a_SpeedCoeff):
+ Super(a_ItemType),
m_ProjectileKind(a_ProjectileKind),
m_SpeedCoeff(a_SpeedCoeff)
{
@@ -54,13 +56,15 @@ protected:
-class cItemEggHandler :
+class cItemEggHandler:
public cItemThrowableHandler
{
- typedef cItemThrowableHandler super;
+ using Super = cItemThrowableHandler;
+
public:
- cItemEggHandler(void) :
- super(E_ITEM_EGG, cProjectileEntity::pkEgg, 30)
+
+ cItemEggHandler():
+ Super(E_ITEM_EGG, cProjectileEntity::pkEgg, 30)
{
}
} ;
@@ -68,14 +72,15 @@ public:
-class cItemSnowballHandler :
+class cItemSnowballHandler:
public cItemThrowableHandler
{
- typedef cItemThrowableHandler super;
+ using Super = cItemThrowableHandler;
public:
- cItemSnowballHandler(void) :
- super(E_ITEM_SNOWBALL, cProjectileEntity::pkSnowball, 30)
+
+ cItemSnowballHandler():
+ Super(E_ITEM_SNOWBALL, cProjectileEntity::pkSnowball, 30)
{
}
} ;
@@ -84,14 +89,15 @@ public:
-class cItemEnderPearlHandler :
+class cItemEnderPearlHandler:
public cItemThrowableHandler
{
- typedef cItemThrowableHandler super;
+ using Super = cItemThrowableHandler;
public:
- cItemEnderPearlHandler(void) :
- super(E_ITEM_ENDER_PEARL, cProjectileEntity::pkEnderPearl, 30)
+
+ cItemEnderPearlHandler():
+ Super(E_ITEM_ENDER_PEARL, cProjectileEntity::pkEnderPearl, 30)
{
}
} ;
@@ -100,13 +106,15 @@ public:
-class cItemBottleOEnchantingHandler :
+class cItemBottleOEnchantingHandler:
public cItemThrowableHandler
{
- typedef cItemThrowableHandler super;
+ using Super = cItemThrowableHandler;
+
public:
- cItemBottleOEnchantingHandler(void) :
- super(E_ITEM_BOTTLE_O_ENCHANTING, cProjectileEntity::pkExpBottle, 14)
+
+ cItemBottleOEnchantingHandler():
+ Super(E_ITEM_BOTTLE_O_ENCHANTING, cProjectileEntity::pkExpBottle, 14)
{
}
};
@@ -115,13 +123,15 @@ public:
-class cItemFireworkHandler :
+class cItemFireworkHandler:
public cItemThrowableHandler
{
- typedef cItemThrowableHandler super;
+ using Super = cItemThrowableHandler;
+
public:
- cItemFireworkHandler(void) :
- super(E_ITEM_FIREWORK_ROCKET, cProjectileEntity::pkFirework, 0)
+
+ cItemFireworkHandler():
+ Super(E_ITEM_FIREWORK_ROCKET, cProjectileEntity::pkFirework, 0)
{
}
diff --git a/src/LightingThread.cpp b/src/LightingThread.cpp
index 426de86ac..0632bbd23 100644
--- a/src/LightingThread.cpp
+++ b/src/LightingThread.cpp
@@ -100,7 +100,7 @@ public:
// cLightingThread:
cLightingThread::cLightingThread(cWorld & a_World):
- super("cLightingThread"),
+ Super("cLightingThread"),
m_World(a_World),
m_MaxHeight(0),
m_NumSeeds(0)
@@ -140,7 +140,7 @@ void cLightingThread::Stop(void)
m_ShouldTerminate = true;
m_evtItemAdded.Set();
- super::Stop();
+ Super::Stop();
}
diff --git a/src/LightingThread.h b/src/LightingThread.h
index 4e009fd0c..1097558a4 100644
--- a/src/LightingThread.h
+++ b/src/LightingThread.h
@@ -45,10 +45,10 @@ class cWorld;
-class cLightingThread :
+class cLightingThread:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
public:
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index 0f1d798be..0b3dcf1f3 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -15,7 +15,7 @@
cLineBlockTracer::cLineBlockTracer(cWorld & a_World, cCallbacks & a_Callbacks) :
- super(a_World, a_Callbacks),
+ Super(a_World, a_Callbacks),
m_StartX(0.0),
m_StartY(0.0),
m_StartZ(0.0),
diff --git a/src/LineBlockTracer.h b/src/LineBlockTracer.h
index 2204e3671..0dca6dfcb 100644
--- a/src/LineBlockTracer.h
+++ b/src/LineBlockTracer.h
@@ -22,12 +22,13 @@ class cChunk;
-class cLineBlockTracer :
+class cLineBlockTracer:
public cBlockTracer
{
- typedef cBlockTracer super;
+ using Super = cBlockTracer;
public:
+
enum eLineOfSight
{
// Bit flags used for LineOfSightTrace's Sight parameter:
diff --git a/src/LoggerListeners.cpp b/src/LoggerListeners.cpp
index 0fed9e69f..2028ae151 100644
--- a/src/LoggerListeners.cpp
+++ b/src/LoggerListeners.cpp
@@ -32,12 +32,14 @@
#ifdef _WIN32
- class cWindowsConsoleListener
- : public cColouredConsoleListener
+ class cWindowsConsoleListener:
+ public cColouredConsoleListener
{
- typedef cColouredConsoleListener super;
+ using Super = cColouredConsoleListener;
+
public:
- cWindowsConsoleListener(HANDLE a_Console, WORD a_DefaultConsoleAttrib) :
+
+ cWindowsConsoleListener(HANDLE a_Console, WORD a_DefaultConsoleAttrib):
m_Console(a_Console),
m_DefaultConsoleAttrib(a_DefaultConsoleAttrib)
{
@@ -46,7 +48,7 @@
#ifdef _DEBUG
virtual void Log(AString a_Message, cLogger::eLogLevel a_LogLevel) override
{
- super::Log(a_Message, a_LogLevel);
+ Super::Log(a_Message, a_LogLevel);
// In a Windows Debug build, output the log to debug console as well:
OutputDebugStringA(a_Message.c_str());
}
diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp
index 79300bc4a..a904ac2da 100644
--- a/src/Mobs/AggressiveMonster.cpp
+++ b/src/Mobs/AggressiveMonster.cpp
@@ -12,7 +12,7 @@
cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height) :
- super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
+ Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = AGGRESSIVE;
}
@@ -24,7 +24,7 @@ cAggressiveMonster::cAggressiveMonster(const AString & a_ConfigName, eMonsterTyp
// What to do if in Chasing State
void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::InStateChasing(a_Dt, a_Chunk);
+ Super::InStateChasing(a_Dt, a_Chunk);
if (GetTarget() != nullptr)
{
@@ -43,7 +43,7 @@ void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
return;
}
- super::EventSeePlayer(a_Player, a_Chunk);
+ Super::EventSeePlayer(a_Player, a_Chunk);
m_EMState = CHASING;
}
@@ -53,7 +53,7 @@ void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
void cAggressiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/AggressiveMonster.h b/src/Mobs/AggressiveMonster.h
index bd4287819..1a4f28943 100644
--- a/src/Mobs/AggressiveMonster.h
+++ b/src/Mobs/AggressiveMonster.h
@@ -7,14 +7,22 @@
-class cAggressiveMonster :
+class cAggressiveMonster:
public cMonster
{
- typedef cMonster super;
+ using Super = cMonster;
public:
- cAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height);
+ cAggressiveMonster(
+ const AString & a_ConfigName,
+ eMonsterType a_MobType,
+ const AString & a_SoundHurt,
+ const AString & a_SoundDeath,
+ const AString & a_SoundAmbient,
+ double a_Width,
+ double a_Height
+ );
virtual void Tick (std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void InStateChasing(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Bat.cpp b/src/Mobs/Bat.cpp
index c1e40dc42..93e117e76 100644
--- a/src/Mobs/Bat.cpp
+++ b/src/Mobs/Bat.cpp
@@ -6,7 +6,7 @@
cBat::cBat(void) :
- super("Bat", mtBat, "entity.bat.hurt", "entity.bat.death", "entity.bat.ambient", 0.5, 0.9)
+ Super("Bat", mtBat, "entity.bat.hurt", "entity.bat.death", "entity.bat.ambient", 0.5, 0.9)
{
SetGravity(-2.0f);
SetAirDrag(0.05f);
diff --git a/src/Mobs/Bat.h b/src/Mobs/Bat.h
index 2da2dc3f2..0d57cd6dd 100644
--- a/src/Mobs/Bat.h
+++ b/src/Mobs/Bat.h
@@ -7,13 +7,14 @@
-class cBat :
+class cBat:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cBat(void);
+
+ cBat();
CLASS_PROTODEF(cBat)
diff --git a/src/Mobs/Blaze.cpp b/src/Mobs/Blaze.cpp
index 1c48a88d2..a87cc02fb 100644
--- a/src/Mobs/Blaze.cpp
+++ b/src/Mobs/Blaze.cpp
@@ -9,7 +9,7 @@
cBlaze::cBlaze(void) :
- super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", "entity.blaze.ambient", 0.6, 1.8),
+ Super("Blaze", mtBlaze, "entity.blaze.hurt", "entity.blaze.death", "entity.blaze.ambient", 0.6, 1.8),
m_IsCharging(false),
m_ChargeTimer(0)
{
@@ -50,7 +50,7 @@ bool cBlaze::Attack(std::chrono::milliseconds a_Dt)
void cBlaze::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Blaze.h b/src/Mobs/Blaze.h
index 3e6726efa..6f1d240a9 100644
--- a/src/Mobs/Blaze.h
+++ b/src/Mobs/Blaze.h
@@ -7,13 +7,14 @@
-class cBlaze :
+class cBlaze:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cBlaze(void);
+
+ cBlaze();
CLASS_PROTODEF(cBlaze)
diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp
index 648a8778f..ad3dda09e 100644
--- a/src/Mobs/CaveSpider.cpp
+++ b/src/Mobs/CaveSpider.cpp
@@ -8,7 +8,7 @@
cCaveSpider::cCaveSpider(void) :
- super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 0.7, 0.5)
+ Super("CaveSpider", mtCaveSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 0.7, 0.5)
{
}
@@ -18,7 +18,7 @@ cCaveSpider::cCaveSpider(void) :
void cCaveSpider::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -34,7 +34,7 @@ void cCaveSpider::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
bool cCaveSpider::Attack(std::chrono::milliseconds a_Dt)
{
- if (!super::Attack(a_Dt))
+ if (!Super::Attack(a_Dt))
{
return false;
}
diff --git a/src/Mobs/CaveSpider.h b/src/Mobs/CaveSpider.h
index cf4b8e17c..3e3fef4ff 100644
--- a/src/Mobs/CaveSpider.h
+++ b/src/Mobs/CaveSpider.h
@@ -6,13 +6,14 @@
-class cCaveSpider :
+class cCaveSpider:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cCaveSpider(void);
+
+ cCaveSpider();
CLASS_PROTODEF(cCaveSpider)
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index f930aa903..71bd80af4 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -8,7 +8,7 @@
cChicken::cChicken(void) :
- super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", "entity.chicken.ambient", 0.4, 0.7),
+ Super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", "entity.chicken.ambient", 0.4, 0.7),
m_EggDropTimer(0)
{
SetGravity(-2.0f);
@@ -21,7 +21,7 @@ cChicken::cChicken(void) :
void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -80,5 +80,5 @@ bool cChicken::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Mobs/Chicken.h b/src/Mobs/Chicken.h
index bb12ce9b3..5e84a61c8 100644
--- a/src/Mobs/Chicken.h
+++ b/src/Mobs/Chicken.h
@@ -6,13 +6,14 @@
-class cChicken :
+class cChicken:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cChicken(void);
+
+ cChicken();
CLASS_PROTODEF(cChicken)
diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp
index 559b6caea..bdbdb87d9 100644
--- a/src/Mobs/Cow.cpp
+++ b/src/Mobs/Cow.cpp
@@ -9,7 +9,7 @@
cCow::cCow(void) :
- super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
+ Super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
{
}
@@ -39,7 +39,7 @@ void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cCow::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
short HeldItem = a_Player.GetEquippedItem().m_ItemType;
if (HeldItem == E_ITEM_BUCKET)
diff --git a/src/Mobs/Cow.h b/src/Mobs/Cow.h
index 569c6e619..657c48cce 100644
--- a/src/Mobs/Cow.h
+++ b/src/Mobs/Cow.h
@@ -7,12 +7,13 @@
-class cCow :
+class cCow:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cCow();
CLASS_PROTODEF(cCow)
diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp
index 75f04dc58..29b402938 100644
--- a/src/Mobs/Creeper.cpp
+++ b/src/Mobs/Creeper.cpp
@@ -11,7 +11,7 @@
cCreeper::cCreeper(void) :
- super("Creeper", mtCreeper, "entity.creeper.hurt", "entity.creeper.death", "entity.creeper.ambient", 0.6, 1.8),
+ Super("Creeper", mtCreeper, "entity.creeper.hurt", "entity.creeper.death", "entity.creeper.ambient", 0.6, 1.8),
m_bIsBlowing(false),
m_bIsCharged(false),
m_BurnedWithFlintAndSteel(false),
@@ -25,7 +25,7 @@ cCreeper::cCreeper(void) :
void cCreeper::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -103,7 +103,7 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
bool cCreeper::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -142,7 +142,7 @@ bool cCreeper::Attack(std::chrono::milliseconds a_Dt)
void cCreeper::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_FLINT_AND_STEEL))
{
diff --git a/src/Mobs/Creeper.h b/src/Mobs/Creeper.h
index aea36def3..5a21cca2a 100644
--- a/src/Mobs/Creeper.h
+++ b/src/Mobs/Creeper.h
@@ -7,13 +7,14 @@
-class cCreeper :
+class cCreeper:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cCreeper(void);
+
+ cCreeper();
CLASS_PROTODEF(cCreeper)
diff --git a/src/Mobs/EnderDragon.cpp b/src/Mobs/EnderDragon.cpp
index 69e523f7e..d6b71552e 100644
--- a/src/Mobs/EnderDragon.cpp
+++ b/src/Mobs/EnderDragon.cpp
@@ -9,7 +9,7 @@
cEnderDragon::cEnderDragon(void) :
// TODO: Vanilla source says this, but is it right? Dragons fly, they don't stand
- super("EnderDragon", mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", "entity.enderdragon.ambient", 16.0, 8.0)
+ Super("EnderDragon", mtEnderDragon, "entity.enderdragon.hurt", "entity.enderdragon.death", "entity.enderdragon.ambient", 16.0, 8.0)
{
}
diff --git a/src/Mobs/EnderDragon.h b/src/Mobs/EnderDragon.h
index 43acdcd54..1856d165c 100644
--- a/src/Mobs/EnderDragon.h
+++ b/src/Mobs/EnderDragon.h
@@ -7,13 +7,14 @@
-class cEnderDragon :
+class cEnderDragon:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cEnderDragon(void);
+
+ cEnderDragon();
CLASS_PROTODEF(cEnderDragon)
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index d5d5112c8..aa7c00bdd 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -73,7 +73,7 @@ protected:
cEnderman::cEnderman(void) :
- super("Enderman", mtEnderman, "entity.endermen.hurt", "entity.endermen.death", "entity.endermen.ambient", 0.5, 2.9),
+ Super("Enderman", mtEnderman, "entity.endermen.hurt", "entity.endermen.death", "entity.endermen.ambient", 0.5, 2.9),
m_bIsScreaming(false),
m_CarriedBlock(E_BLOCK_AIR),
m_CarriedMeta(0)
@@ -131,7 +131,7 @@ void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk)
void cEnderman::CheckEventLostPlayer(void)
{
- super::CheckEventLostPlayer();
+ Super::CheckEventLostPlayer();
EventLosePlayer();
}
@@ -141,7 +141,7 @@ void cEnderman::CheckEventLostPlayer(void)
void cEnderman::EventLosePlayer()
{
- super::EventLosePlayer();
+ Super::EventLosePlayer();
m_bIsScreaming = false;
GetWorld()->BroadcastEntityMetadata(*this);
}
@@ -152,7 +152,7 @@ void cEnderman::EventLosePlayer()
void cEnderman::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Enderman.h b/src/Mobs/Enderman.h
index 4f3f26119..fa3b0d06b 100644
--- a/src/Mobs/Enderman.h
+++ b/src/Mobs/Enderman.h
@@ -7,13 +7,14 @@
-class cEnderman :
+class cEnderman:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cEnderman(void);
+
+ cEnderman();
CLASS_PROTODEF(cEnderman)
diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp
index 40a7bdf0f..88b10294a 100644
--- a/src/Mobs/Ghast.cpp
+++ b/src/Mobs/Ghast.cpp
@@ -9,7 +9,7 @@
cGhast::cGhast(void) :
- super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", "entity.ghast.ambient", 4, 4),
+ Super("Ghast", mtGhast, "entity.ghast.hurt", "entity.ghast.death", "entity.ghast.ambient", 4, 4),
m_IsCharging(false),
m_FlightCooldown(5),
m_TicksUntilShot(10)
@@ -64,7 +64,7 @@ bool cGhast::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
@@ -73,7 +73,7 @@ bool cGhast::DoTakeDamage(TakeDamageInfo & a_TDI)
void cGhast::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Ghast.h b/src/Mobs/Ghast.h
index 7312b25c9..8161b93bf 100644
--- a/src/Mobs/Ghast.h
+++ b/src/Mobs/Ghast.h
@@ -7,13 +7,14 @@
-class cGhast :
+class cGhast:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cGhast(void);
+
+ cGhast();
CLASS_PROTODEF(cGhast)
diff --git a/src/Mobs/Giant.cpp b/src/Mobs/Giant.cpp
index 35002282e..f6b36b6f7 100644
--- a/src/Mobs/Giant.cpp
+++ b/src/Mobs/Giant.cpp
@@ -8,7 +8,7 @@
cGiant::cGiant(void) :
- super("Giant", mtGiant, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 3.6, 10.8)
+ Super("Giant", mtGiant, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 3.6, 10.8)
{
}
diff --git a/src/Mobs/Giant.h b/src/Mobs/Giant.h
index 70e93894c..46298717c 100644
--- a/src/Mobs/Giant.h
+++ b/src/Mobs/Giant.h
@@ -7,12 +7,13 @@
-class cGiant :
+class cGiant:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cGiant(void);
CLASS_PROTODEF(cGiant)
diff --git a/src/Mobs/Guardian.cpp b/src/Mobs/Guardian.cpp
index bc16e48c0..fbc10172d 100644
--- a/src/Mobs/Guardian.cpp
+++ b/src/Mobs/Guardian.cpp
@@ -9,7 +9,7 @@
cGuardian::cGuardian(void) :
- super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", "entity.guardian.ambient", 0.875, 0.8)
+ Super("Guardian", mtGuardian, "entity.guardian.hurt", "entity.guardian.death", "entity.guardian.ambient", 0.875, 0.8)
{
}
@@ -48,7 +48,7 @@ void cGuardian::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
return;
}
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
diff --git a/src/Mobs/Guardian.h b/src/Mobs/Guardian.h
index 289654f57..5867c1f42 100644
--- a/src/Mobs/Guardian.h
+++ b/src/Mobs/Guardian.h
@@ -7,12 +7,13 @@
-class cGuardian :
+class cGuardian:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cGuardian();
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index 54e4f2c59..926f125b9 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -11,7 +11,7 @@
cHorse::cHorse(int Type, int Color, int Style, int TameTimes) :
- super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", "entity.horse.ambient", 1.4, 1.6),
+ Super("Horse", mtHorse, "entity.horse.hurt", "entity.horse.death", "entity.horse.ambient", 1.4, 1.6),
cEntityWindowOwner(this),
m_bHasChest(false),
m_bIsEating(false),
@@ -47,7 +47,7 @@ cHorse::~cHorse()
void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -116,7 +116,7 @@ void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cHorse::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_bIsTame)
{
@@ -272,7 +272,7 @@ void cHorse::InStateIdle(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
// If horse is tame and someone is sitting on it, don't walk around
if ((!m_bIsTame) || (m_Attachee == nullptr))
{
- super::InStateIdle(a_Dt, a_Chunk);
+ Super::InStateIdle(a_Dt, a_Chunk);
}
}
@@ -284,7 +284,7 @@ void cHorse::HandleSpeedFromAttachee(float a_Forward, float a_Sideways)
{
if ((m_bIsTame) && IsSaddled())
{
- super::HandleSpeedFromAttachee(a_Forward * m_MaxSpeed, a_Sideways * m_MaxSpeed);
+ Super::HandleSpeedFromAttachee(a_Forward * m_MaxSpeed, a_Sideways * m_MaxSpeed);
}
}
diff --git a/src/Mobs/Horse.h b/src/Mobs/Horse.h
index 68ad82b56..f9c236ffc 100644
--- a/src/Mobs/Horse.h
+++ b/src/Mobs/Horse.h
@@ -8,13 +8,14 @@
-class cHorse :
+class cHorse:
public cPassiveMonster,
public cEntityWindowOwner
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cHorse(int Type, int Color, int Style, int TameTimes);
virtual ~cHorse() override;
diff --git a/src/Mobs/IronGolem.cpp b/src/Mobs/IronGolem.cpp
index 943108254..c1f6c3809 100644
--- a/src/Mobs/IronGolem.cpp
+++ b/src/Mobs/IronGolem.cpp
@@ -8,7 +8,7 @@
cIronGolem::cIronGolem(void) :
- super("IronGolem", mtIronGolem, "entity.irongolem.hurt", "entity.irongolem.death", "entity.irongolem.ambient", 1.4, 2.9)
+ Super("IronGolem", mtIronGolem, "entity.irongolem.hurt", "entity.irongolem.death", "entity.irongolem.ambient", 1.4, 2.9)
{
}
diff --git a/src/Mobs/IronGolem.h b/src/Mobs/IronGolem.h
index 7d35686e7..92b0e42fd 100644
--- a/src/Mobs/IronGolem.h
+++ b/src/Mobs/IronGolem.h
@@ -7,13 +7,14 @@
-class cIronGolem :
+class cIronGolem:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cIronGolem(void);
+
+ cIronGolem();
CLASS_PROTODEF(cIronGolem)
diff --git a/src/Mobs/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp
index 52a4c3b07..369cda6d9 100644
--- a/src/Mobs/MagmaCube.cpp
+++ b/src/Mobs/MagmaCube.cpp
@@ -7,7 +7,7 @@
cMagmaCube::cMagmaCube(int a_Size) :
- super("MagmaCube", mtMagmaCube, Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()), Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()), "", 0.6 * a_Size, 0.6 * a_Size),
+ Super("MagmaCube", mtMagmaCube, Printf("entity.%smagmacube.hurt", GetSizeName(a_Size).c_str()), Printf("entity.%smagmacube.death", GetSizeName(a_Size).c_str()), "", 0.6 * a_Size, 0.6 * a_Size),
m_Size(a_Size)
{
}
diff --git a/src/Mobs/MagmaCube.h b/src/Mobs/MagmaCube.h
index 5fc8105ba..3a7d25055 100644
--- a/src/Mobs/MagmaCube.h
+++ b/src/Mobs/MagmaCube.h
@@ -6,12 +6,13 @@
-class cMagmaCube :
+class cMagmaCube:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
/** Creates a MagmaCube of the specified size; with 1 being the smallest */
cMagmaCube(int a_Size);
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 3cb1b00e8..da09050cf 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -80,7 +80,7 @@ static const struct
// cMonster:
cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height)
- : super(etMonster, a_Width, a_Height)
+ : Super(etMonster, a_Width, a_Height)
, m_EMState(IDLE)
, m_EMPersonality(AGGRESSIVE)
, m_PathFinder(a_Width, a_Height)
@@ -153,7 +153,7 @@ void cMonster::OnRemoveFromWorld(cWorld & a_World)
}
}
- super::OnRemoveFromWorld(a_World);
+ Super::OnRemoveFromWorld(a_World);
}
@@ -163,7 +163,7 @@ void cMonster::OnRemoveFromWorld(cWorld & a_World)
void cMonster::Destroyed()
{
SetTarget(nullptr); // Tell them we're no longer targeting them.
- super::Destroyed();
+ Super::Destroyed();
}
@@ -269,7 +269,7 @@ void cMonster::StopMovingToPosition()
void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -544,7 +544,7 @@ void cMonster::SetPitchAndYawFromDestination(bool a_IsFollowingPath)
void cMonster::HandleFalling()
{
m_bTouchGround = IsOnGround();
- super::HandleFalling();
+ Super::HandleFalling();
}
@@ -582,7 +582,7 @@ int cMonster::FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ)
bool cMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -617,7 +617,7 @@ void cMonster::DoMoveToWorld(const cEntity::sWorldChangeInfo & a_WorldChangeInfo
SetTarget(nullptr);
StopEveryoneFromTargetingMe();
- super::DoMoveToWorld(a_WorldChangeInfo);
+ Super::DoMoveToWorld(a_WorldChangeInfo);
}
@@ -626,7 +626,7 @@ void cMonster::DoMoveToWorld(const cEntity::sWorldChangeInfo & a_WorldChangeInfo
void cMonster::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
if (m_SoundHurt != "")
{
m_World->BroadcastSoundEffect(m_SoundDeath, GetPosition(), 1.0f, 0.8f);
@@ -707,7 +707,7 @@ void cMonster::KilledBy(TakeDamageInfo & a_TDI)
void cMonster::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
if ((EquippedItem.m_ItemType == E_ITEM_NAME_TAG) && !EquippedItem.m_CustomName.empty())
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 93c29c533..89c9871e9 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -12,10 +12,16 @@ class cClientHandle;
// tolua_begin
-class cMonster :
+class cMonster:
public cPawn
{
- typedef cPawn super;
+
+ // tolua_end
+
+ using Super = cPawn;
+
+ // tolua_begin
+
public:
enum eFamily
diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp
index 135a8ba90..1190f46e9 100644
--- a/src/Mobs/Mooshroom.cpp
+++ b/src/Mobs/Mooshroom.cpp
@@ -9,7 +9,7 @@
cMooshroom::cMooshroom(void) :
- super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
+ Super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", "entity.cow.ambient", 0.9, 1.3)
{
}
diff --git a/src/Mobs/Mooshroom.h b/src/Mobs/Mooshroom.h
index 625963190..7ecd45c5b 100644
--- a/src/Mobs/Mooshroom.h
+++ b/src/Mobs/Mooshroom.h
@@ -7,13 +7,14 @@
-class cMooshroom :
+class cMooshroom:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cMooshroom(void);
+
+ cMooshroom();
CLASS_PROTODEF(cMooshroom)
diff --git a/src/Mobs/Ocelot.cpp b/src/Mobs/Ocelot.cpp
index 3899d329c..2573808be 100644
--- a/src/Mobs/Ocelot.cpp
+++ b/src/Mobs/Ocelot.cpp
@@ -21,7 +21,7 @@
*/
cOcelot::cOcelot(void) :
- super("Ocelot", mtOcelot, "entity.cat.hurt", "entity.cat.death", "entity.cat.ambient", 0.6, 0.8),
+ Super("Ocelot", mtOcelot, "entity.cat.hurt", "entity.cat.death", "entity.cat.ambient", 0.6, 0.8),
m_IsSitting(false),
m_IsTame(false),
m_IsBegging(false),
@@ -36,7 +36,7 @@ cOcelot::cOcelot(void) :
void cOcelot::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -179,12 +179,12 @@ void cOcelot::OnRightClicked(cPlayer & a_Player)
}
else
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
}
}
else if (a_Player.GetUUID() == m_OwnerUUID)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
SetIsSitting(!IsSitting());
}
m_World->BroadcastEntityMetadata(*this);
@@ -220,5 +220,5 @@ bool cOcelot::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
diff --git a/src/Mobs/Ocelot.h b/src/Mobs/Ocelot.h
index 226da228d..28deef4b4 100644
--- a/src/Mobs/Ocelot.h
+++ b/src/Mobs/Ocelot.h
@@ -8,10 +8,10 @@
-class cOcelot :
+class cOcelot:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index 94608a0fc..bf4a3167c 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -10,7 +10,7 @@
cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height) :
- super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
+ Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height)
{
m_EMPersonality = PASSIVE;
}
@@ -21,7 +21,7 @@ cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigNam
bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
diff --git a/src/Mobs/PassiveAggressiveMonster.h b/src/Mobs/PassiveAggressiveMonster.h
index a29da3463..f42c7a89b 100644
--- a/src/Mobs/PassiveAggressiveMonster.h
+++ b/src/Mobs/PassiveAggressiveMonster.h
@@ -7,13 +7,22 @@
-class cPassiveAggressiveMonster :
+class cPassiveAggressiveMonster:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height);
+
+ cPassiveAggressiveMonster(
+ const AString & a_ConfigName,
+ eMonsterType a_MobType,
+ const AString & a_SoundHurt,
+ const AString & a_SoundDeath,
+ const AString & a_SoundAmbient,
+ double a_Width,
+ double a_Height
+ );
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
virtual void EventSeePlayer(cPlayer *, cChunk & a_Chunk) override;
diff --git a/src/Mobs/PassiveMonster.cpp b/src/Mobs/PassiveMonster.cpp
index f0043c2d4..fa2874dcf 100644
--- a/src/Mobs/PassiveMonster.cpp
+++ b/src/Mobs/PassiveMonster.cpp
@@ -11,7 +11,7 @@
cPassiveMonster::cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height) :
- super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height),
+ Super(a_ConfigName, a_MobType, a_SoundHurt, a_SoundDeath, a_SoundAmbient, a_Width, a_Height),
m_LovePartner(nullptr),
m_LoveTimer(0),
m_LoveCooldown(0),
@@ -26,7 +26,7 @@ cPassiveMonster::cPassiveMonster(const AString & a_ConfigName, eMonsterType a_Mo
bool cPassiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -72,7 +72,7 @@ void cPassiveMonster::Destroyed()
{
m_LovePartner->ResetLoveMode();
}
- super::Destroyed();
+ Super::Destroyed();
}
@@ -81,7 +81,7 @@ void cPassiveMonster::Destroyed()
void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -206,7 +206,7 @@ void cPassiveMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cPassiveMonster::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
diff --git a/src/Mobs/PassiveMonster.h b/src/Mobs/PassiveMonster.h
index a0567c55b..fbe381955 100644
--- a/src/Mobs/PassiveMonster.h
+++ b/src/Mobs/PassiveMonster.h
@@ -7,13 +7,22 @@
-class cPassiveMonster :
+class cPassiveMonster:
public cMonster
{
- typedef cMonster super;
+ using Super = cMonster;
public:
- cPassiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, const AString & a_SoundAmbient, double a_Width, double a_Height);
+
+ cPassiveMonster(
+ const AString & a_ConfigName,
+ eMonsterType a_MobType,
+ const AString & a_SoundHurt,
+ const AString & a_SoundDeath,
+ const AString & a_SoundAmbient,
+ double a_Width,
+ double a_Height
+ );
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
virtual void OnRightClicked(cPlayer & a_Player) override;
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index 2618882d3..1e531aebd 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -10,7 +10,7 @@
cPig::cPig(void) :
- super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", "entity.pig.ambient", 0.9, 0.9),
+ Super("Pig", mtPig, "entity.pig.hurt", "entity.pig.death", "entity.pig.ambient", 0.9, 0.9),
m_bIsSaddled(false)
{
}
@@ -44,7 +44,7 @@ void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cPig::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
if (m_bIsSaddled)
{
@@ -89,7 +89,7 @@ void cPig::OnRightClicked(cPlayer & a_Player)
void cPig::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -112,7 +112,7 @@ void cPig::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
bool cPig::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
diff --git a/src/Mobs/Pig.h b/src/Mobs/Pig.h
index ed0685e5f..fe2837bec 100644
--- a/src/Mobs/Pig.h
+++ b/src/Mobs/Pig.h
@@ -7,13 +7,14 @@
-class cPig :
+class cPig:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
- cPig(void);
+
+ cPig();
CLASS_PROTODEF(cPig)
diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp
index a5340c0d4..1fb9cd7d3 100644
--- a/src/Mobs/Rabbit.cpp
+++ b/src/Mobs/Rabbit.cpp
@@ -21,7 +21,7 @@ cRabbit::cRabbit(void) :
cRabbit::cRabbit(eRabbitType Type, int MoreCarrotTicks) :
- super("Rabbit", mtRabbit, "entity.rabbit.hurt", "entity.rabbit.death", "entity.rabbit.ambient", 0.82, 0.68),
+ Super("Rabbit", mtRabbit, "entity.rabbit.hurt", "entity.rabbit.death", "entity.rabbit.ambient", 0.82, 0.68),
m_Type(Type),
m_MoreCarrotTicks(MoreCarrotTicks)
{
diff --git a/src/Mobs/Rabbit.h b/src/Mobs/Rabbit.h
index 289ff0282..33a9f7fa4 100644
--- a/src/Mobs/Rabbit.h
+++ b/src/Mobs/Rabbit.h
@@ -22,12 +22,13 @@ enum class eRabbitType : UInt8
-class cRabbit :
+class cRabbit:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cRabbit();
cRabbit(eRabbitType Type, int MoreCarrotTicks = 0);
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp
index 02ca21fbe..2a6d27969 100644
--- a/src/Mobs/Sheep.cpp
+++ b/src/Mobs/Sheep.cpp
@@ -12,7 +12,7 @@
cSheep::cSheep(int a_Color) :
- super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", "entity.sheep.ambient", 0.6, 1.3),
+ Super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", "entity.sheep.ambient", 0.6, 1.3),
m_IsSheared(false),
m_WoolColor(a_Color),
m_TimeToStopEating(-1)
@@ -59,7 +59,7 @@ void cSheep::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSheep::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
if ((EquippedItem.m_ItemType == E_ITEM_SHEARS) && !IsSheared() && !IsBaby())
@@ -91,7 +91,7 @@ void cSheep::OnRightClicked(cPlayer & a_Player)
void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/Sheep.h b/src/Mobs/Sheep.h
index c8af067f3..c0a83f3ec 100644
--- a/src/Mobs/Sheep.h
+++ b/src/Mobs/Sheep.h
@@ -7,10 +7,10 @@
-class cSheep :
+class cSheep:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
diff --git a/src/Mobs/Silverfish.h b/src/Mobs/Silverfish.h
index c6a4cb49a..435061f72 100644
--- a/src/Mobs/Silverfish.h
+++ b/src/Mobs/Silverfish.h
@@ -7,14 +7,15 @@
-class cSilverfish :
+class cSilverfish:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cSilverfish(void) :
- super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.3, 0.4)
+
+ cSilverfish():
+ Super("Silverfish", mtSilverfish, "entity.silverfish.hurt", "entity.silverfish.death", "entity.silverfish.ambient", 0.3, 0.4)
{
}
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index e58bb9384..44700e9d3 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -10,7 +10,7 @@
cSkeleton::cSkeleton(void) :
- super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", "entity.skeleton.ambient", 0.6, 1.8)
+ Super("Skeleton", mtSkeleton, "entity.skeleton.hurt", "entity.skeleton.death", "entity.skeleton.ambient", 0.6, 1.8)
{
}
@@ -65,7 +65,7 @@ bool cSkeleton::Attack(std::chrono::milliseconds a_Dt)
void cSkeleton::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_BOW));
}
diff --git a/src/Mobs/Skeleton.h b/src/Mobs/Skeleton.h
index cb7dec5ad..dfd1a740f 100644
--- a/src/Mobs/Skeleton.h
+++ b/src/Mobs/Skeleton.h
@@ -7,13 +7,14 @@
-class cSkeleton :
+class cSkeleton:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cSkeleton(void);
+
+ cSkeleton();
CLASS_PROTODEF(cSkeleton)
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 7bb43a54a..00cf30d13 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -10,7 +10,7 @@
cSlime::cSlime(int a_Size) :
- super("Slime",
+ Super("Slime",
mtSlime,
Printf("entity.%sslime.hurt", GetSizeName(a_Size).c_str()),
Printf("entity.%sslime.death", GetSizeName(a_Size).c_str()),
@@ -52,7 +52,7 @@ bool cSlime::Attack(std::chrono::milliseconds a_Dt)
if (m_Size > 1)
{
// Only slimes larger than size 1 attack a player.
- return super::Attack(a_Dt);
+ return Super::Attack(a_Dt);
}
return false;
@@ -85,7 +85,7 @@ void cSlime::KilledBy(TakeDamageInfo & a_TDI)
m_World->SpawnMobFinalize(std::move(NewSlime));
}
}
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
}
diff --git a/src/Mobs/Slime.h b/src/Mobs/Slime.h
index c78461a02..e1be964eb 100644
--- a/src/Mobs/Slime.h
+++ b/src/Mobs/Slime.h
@@ -7,12 +7,13 @@
-class cSlime :
+class cSlime:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
/** Creates a slime of the specified size; size can be 1, 2 or 4, with 1 is the smallest and 4 is the tallest. */
cSlime(int a_Size);
diff --git a/src/Mobs/SnowGolem.cpp b/src/Mobs/SnowGolem.cpp
index ce94c9dae..2e6d5ea09 100644
--- a/src/Mobs/SnowGolem.cpp
+++ b/src/Mobs/SnowGolem.cpp
@@ -10,7 +10,7 @@
cSnowGolem::cSnowGolem(void) :
- super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", "entity.snowman.ambient", 0.4, 1.8)
+ Super("SnowGolem", mtSnowGolem, "entity.snowman.hurt", "entity.snowman.death", "entity.snowman.ambient", 0.4, 1.8)
{
}
@@ -30,7 +30,7 @@ void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSnowGolem::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
diff --git a/src/Mobs/SnowGolem.h b/src/Mobs/SnowGolem.h
index 708ddbef9..8504965cb 100644
--- a/src/Mobs/SnowGolem.h
+++ b/src/Mobs/SnowGolem.h
@@ -7,13 +7,14 @@
-class cSnowGolem :
+class cSnowGolem:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cSnowGolem(void);
+
+ cSnowGolem();
CLASS_PROTODEF(cSnowGolem)
diff --git a/src/Mobs/Spider.cpp b/src/Mobs/Spider.cpp
index 329d89e93..be8196cea 100644
--- a/src/Mobs/Spider.cpp
+++ b/src/Mobs/Spider.cpp
@@ -9,7 +9,7 @@
cSpider::cSpider(void) :
- super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 1.4, 0.9)
+ Super("Spider", mtSpider, "entity.spider.hurt", "entity.spider.death", "entity.spider.ambient", 1.4, 0.9)
{
}
@@ -53,7 +53,7 @@ void cSpider::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
!((Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) > 11) || (Chunk->GetBlockLight(Rel.x, Rel.y, Rel.z) > 11))
)
{
- super::EventSeePlayer(a_Player, a_Chunk);
+ Super::EventSeePlayer(a_Player, a_Chunk);
}
}
@@ -63,7 +63,7 @@ void cSpider::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk)
bool cSpider::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
diff --git a/src/Mobs/Spider.h b/src/Mobs/Spider.h
index af2753012..2a0b9861e 100644
--- a/src/Mobs/Spider.h
+++ b/src/Mobs/Spider.h
@@ -7,13 +7,14 @@
-class cSpider :
+class cSpider:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cSpider(void);
+
+ cSpider();
CLASS_PROTODEF(cSpider)
diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp
index a63982f05..dffa96f62 100644
--- a/src/Mobs/Squid.cpp
+++ b/src/Mobs/Squid.cpp
@@ -9,7 +9,7 @@
cSquid::cSquid(void) :
- super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", "entity.squid.ambient", 0.95, 0.95)
+ Super("Squid", mtSquid, "entity.squid.hurt", "entity.squid.death", "entity.squid.ambient", 0.95, 0.95)
{
}
@@ -77,5 +77,5 @@ void cSquid::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
m_AirTickTimer = DROWNING_TICKS;
}
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
diff --git a/src/Mobs/Squid.h b/src/Mobs/Squid.h
index aeeec77df..a2cc48b13 100644
--- a/src/Mobs/Squid.h
+++ b/src/Mobs/Squid.h
@@ -7,12 +7,13 @@
-class cSquid :
+class cSquid:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
+
cSquid();
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index eca8ed2b6..2290d120f 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -12,7 +12,7 @@
cVillager::cVillager(eVillagerType VillagerType) :
- super("Villager", mtVillager, "entity.villager.hurt", "entity.villager.death", "entity.villager.ambient", 0.6, 1.8),
+ Super("Villager", mtVillager, "entity.villager.hurt", "entity.villager.death", "entity.villager.ambient", 0.6, 1.8),
m_ActionCountDown(-1),
m_Type(VillagerType),
m_VillagerAction(false)
@@ -25,7 +25,7 @@ cVillager::cVillager(eVillagerType VillagerType) :
bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -53,7 +53,7 @@ bool cVillager::DoTakeDamage(TakeDamageInfo & a_TDI)
void cVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -110,7 +110,7 @@ void cVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cVillager::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
// TODO: 0% chance on Easy, 50% chance on Normal and 100% chance on Hard
if (GetRandomProvider().RandBool(0.5) && (a_TDI.Attacker != nullptr) && (a_TDI.Attacker->IsMob()))
diff --git a/src/Mobs/Villager.h b/src/Mobs/Villager.h
index 2d6644193..4ac06765c 100644
--- a/src/Mobs/Villager.h
+++ b/src/Mobs/Villager.h
@@ -7,10 +7,10 @@
-class cVillager :
+class cVillager:
public cPassiveMonster
{
- typedef cPassiveMonster super;
+ using Super = cPassiveMonster;
public:
diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp
index a2e440705..a13593ae7 100644
--- a/src/Mobs/Witch.cpp
+++ b/src/Mobs/Witch.cpp
@@ -9,7 +9,7 @@
cWitch::cWitch(void) :
- super("Witch", mtWitch, "entity.witch.hurt", "entity.witch.death", "entity.witch.ambient", 0.6, 1.8)
+ Super("Witch", mtWitch, "entity.witch.hurt", "entity.witch.death", "entity.witch.ambient", 0.6, 1.8)
{
}
diff --git a/src/Mobs/Witch.h b/src/Mobs/Witch.h
index 706fcd9b3..44f4ba271 100644
--- a/src/Mobs/Witch.h
+++ b/src/Mobs/Witch.h
@@ -7,12 +7,13 @@
-class cWitch :
+class cWitch:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cWitch();
CLASS_PROTODEF(cWitch)
diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp
index 912e3e1d2..2b84cb142 100644
--- a/src/Mobs/Wither.cpp
+++ b/src/Mobs/Wither.cpp
@@ -11,7 +11,7 @@
cWither::cWither(void) :
- super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", "entity.wither.ambient", 0.9, 4.0),
+ Super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", "entity.wither.ambient", 0.9, 4.0),
m_WitherInvulnerableTicks(220)
{
SetMaxHealth(300);
@@ -48,7 +48,7 @@ bool cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- return super::DoTakeDamage(a_TDI);
+ return Super::DoTakeDamage(a_TDI);
}
@@ -57,7 +57,7 @@ bool cWither::DoTakeDamage(TakeDamageInfo & a_TDI)
void cWither::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -99,7 +99,7 @@ void cWither::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cWither::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
Vector3d Pos = GetPosition();
m_World->ForEachPlayer([=](cPlayer & a_Player)
diff --git a/src/Mobs/Wither.h b/src/Mobs/Wither.h
index 5f6ec607c..21e6aecf8 100644
--- a/src/Mobs/Wither.h
+++ b/src/Mobs/Wither.h
@@ -7,13 +7,14 @@
-class cWither :
+class cWither:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cWither(void);
+
+ cWither();
CLASS_PROTODEF(cWither)
diff --git a/src/Mobs/WitherSkeleton.cpp b/src/Mobs/WitherSkeleton.cpp
index 7dd8d5017..6c3a79095 100644
--- a/src/Mobs/WitherSkeleton.cpp
+++ b/src/Mobs/WitherSkeleton.cpp
@@ -9,7 +9,7 @@
cWitherSkeleton::cWitherSkeleton(void) :
- super("WitherSkeleton", mtWitherSkeleton, "entity.wither_skeleton.hurt", "entity.wither_skeleton.death", "entity.wither_skeleton.ambient", 0.7, 2.4)
+ Super("WitherSkeleton", mtWitherSkeleton, "entity.wither_skeleton.hurt", "entity.wither_skeleton.death", "entity.wither_skeleton.ambient", 0.7, 2.4)
{
}
@@ -25,7 +25,7 @@ bool cWitherSkeleton::Attack(std::chrono::milliseconds a_Dt)
}
GetTarget()->AddEntityEffect(cEntityEffect::effWither, 200, 0);
- return super::Attack(a_Dt);
+ return Super::Attack(a_Dt);
}
@@ -57,6 +57,6 @@ void cWitherSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cWitherSkeleton::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_STONE_SWORD));
}
diff --git a/src/Mobs/WitherSkeleton.h b/src/Mobs/WitherSkeleton.h
index c77d06822..41e55e073 100644
--- a/src/Mobs/WitherSkeleton.h
+++ b/src/Mobs/WitherSkeleton.h
@@ -7,13 +7,14 @@
-class cWitherSkeleton :
+class cWitherSkeleton:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
- cWitherSkeleton(void);
+
+ cWitherSkeleton();
CLASS_PROTODEF(cWitherSkeleton)
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp
index 19cffb810..e2be2a8d9 100644
--- a/src/Mobs/Wolf.cpp
+++ b/src/Mobs/Wolf.cpp
@@ -11,7 +11,7 @@
cWolf::cWolf(void) :
- super("Wolf", mtWolf, "entity.wolf.hurt", "entity.wolf.death", "entity.wolf.ambient", 0.6, 0.8),
+ Super("Wolf", mtWolf, "entity.wolf.hurt", "entity.wolf.death", "entity.wolf.ambient", 0.6, 0.8),
m_IsSitting(false),
m_IsTame(false),
m_IsBegging(false),
@@ -30,7 +30,7 @@ cWolf::cWolf(void) :
bool cWolf::DoTakeDamage(TakeDamageInfo & a_TDI)
{
cPawn * PreviousTarget = GetTarget();
- if (!super::DoTakeDamage(a_TDI))
+ if (!Super::DoTakeDamage(a_TDI))
{
return false;
}
@@ -106,7 +106,7 @@ bool cWolf::Attack(std::chrono::milliseconds a_Dt)
}
NotifyAlliesOfFight(static_cast<cPawn*>(GetTarget()));
- return super::Attack(a_Dt);
+ return Super::Attack(a_Dt);
}
@@ -260,7 +260,7 @@ void cWolf::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
else
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
}
if (!IsTicking())
diff --git a/src/Mobs/Wolf.h b/src/Mobs/Wolf.h
index 861419ba8..6ce708a52 100644
--- a/src/Mobs/Wolf.h
+++ b/src/Mobs/Wolf.h
@@ -9,13 +9,14 @@ class cEntity;
-class cWolf :
+class cWolf:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cWolf(void);
+
+ cWolf();
CLASS_PROTODEF(cWolf)
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp
index 02c1efa86..73e5f8c1e 100644
--- a/src/Mobs/Zombie.cpp
+++ b/src/Mobs/Zombie.cpp
@@ -10,7 +10,7 @@
cZombie::cZombie() :
- super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 0.6, 1.8)
+ Super("Zombie", mtZombie, "entity.zombie.hurt", "entity.zombie.death", "entity.zombie.ambient", 0.6, 1.8)
{
}
diff --git a/src/Mobs/Zombie.h b/src/Mobs/Zombie.h
index 20f59a627..111847ea3 100644
--- a/src/Mobs/Zombie.h
+++ b/src/Mobs/Zombie.h
@@ -6,12 +6,13 @@
-class cZombie :
+class cZombie:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cZombie();
CLASS_PROTODEF(cZombie)
diff --git a/src/Mobs/ZombiePigman.cpp b/src/Mobs/ZombiePigman.cpp
index 1b6e80f36..efc19ab9d 100644
--- a/src/Mobs/ZombiePigman.cpp
+++ b/src/Mobs/ZombiePigman.cpp
@@ -9,7 +9,7 @@
cZombiePigman::cZombiePigman(void) :
- super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", "entity.zombie_pig.ambient", 0.6, 1.8)
+ Super("ZombiePigman", mtZombiePigman, "entity.zombie_pig.hurt", "entity.zombie_pig.death", "entity.zombie_pig.ambient", 0.6, 1.8)
{
}
@@ -40,7 +40,7 @@ void cZombiePigman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cZombiePigman::SpawnOn(cClientHandle & a_ClientHandle)
{
- super::SpawnOn(a_ClientHandle);
+ Super::SpawnOn(a_ClientHandle);
a_ClientHandle.SendEntityEquipment(*this, 0, cItem(E_ITEM_GOLD_SWORD));
}
@@ -50,7 +50,7 @@ void cZombiePigman::SpawnOn(cClientHandle & a_ClientHandle)
void cZombiePigman::KilledBy(TakeDamageInfo & a_TDI)
{
- super::KilledBy(a_TDI);
+ Super::KilledBy(a_TDI);
if ((a_TDI.Attacker != nullptr) && (a_TDI.Attacker->IsPlayer()))
{
diff --git a/src/Mobs/ZombiePigman.h b/src/Mobs/ZombiePigman.h
index 23a7be8da..ccc07e9a2 100644
--- a/src/Mobs/ZombiePigman.h
+++ b/src/Mobs/ZombiePigman.h
@@ -6,13 +6,14 @@
-class cZombiePigman :
+class cZombiePigman:
public cPassiveAggressiveMonster
{
- typedef cPassiveAggressiveMonster super;
+ using Super = cPassiveAggressiveMonster;
public:
- cZombiePigman(void);
+
+ cZombiePigman();
CLASS_PROTODEF(cZombiePigman)
diff --git a/src/Mobs/ZombieVillager.cpp b/src/Mobs/ZombieVillager.cpp
index 9d17e6038..5e3a32af2 100644
--- a/src/Mobs/ZombieVillager.cpp
+++ b/src/Mobs/ZombieVillager.cpp
@@ -11,7 +11,7 @@
cZombieVillager::cZombieVillager(cVillager::eVillagerType a_Profession) :
- super("ZombieVillager", mtZombieVillager, "entity.zombie_villager.hurt", "entity.zombie_villager.death", "entity.ambient", 0.6, 1.8),
+ Super("ZombieVillager", mtZombieVillager, "entity.zombie_villager.hurt", "entity.zombie_villager.death", "entity.ambient", 0.6, 1.8),
m_ConversionTime(-1),
m_Profession(a_Profession)
{
@@ -45,7 +45,7 @@ void cZombieVillager::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cZombieVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
- super::Tick(a_Dt, a_Chunk);
+ Super::Tick(a_Dt, a_Chunk);
if (!IsTicking())
{
// The base class tick destroyed us
@@ -72,7 +72,7 @@ void cZombieVillager::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
void cZombieVillager::OnRightClicked(cPlayer & a_Player)
{
- super::OnRightClicked(a_Player);
+ Super::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
if ((EquippedItem.m_ItemType == E_ITEM_GOLDEN_APPLE) && GetEntityEffect(cEntityEffect::effWeakness) != nullptr)
diff --git a/src/Mobs/ZombieVillager.h b/src/Mobs/ZombieVillager.h
index c4c4ae3d1..2a3e67959 100644
--- a/src/Mobs/ZombieVillager.h
+++ b/src/Mobs/ZombieVillager.h
@@ -7,12 +7,13 @@
-class cZombieVillager :
+class cZombieVillager:
public cAggressiveMonster
{
- typedef cAggressiveMonster super;
+ using Super = cAggressiveMonster;
public:
+
cZombieVillager(cVillager::eVillagerType a_Profession);
CLASS_PROTODEF(cZombieVillager)
diff --git a/src/OSSupport/ServerHandleImpl.h b/src/OSSupport/ServerHandleImpl.h
index 1edd59dc1..eb0dca386 100644
--- a/src/OSSupport/ServerHandleImpl.h
+++ b/src/OSSupport/ServerHandleImpl.h
@@ -34,10 +34,11 @@ typedef std::vector<cServerHandleImplPtr> cServerHandleImplPtrs;
class cServerHandleImpl:
public cServerHandle
{
- typedef cServerHandle super;
+ using Super = cServerHandle;
friend class cTCPLinkImpl;
public:
+
/** Closes the server, dropping all the connections. */
virtual ~cServerHandleImpl() override;
diff --git a/src/OSSupport/TCPLinkImpl.cpp b/src/OSSupport/TCPLinkImpl.cpp
index 63e5fb1da..f1918a76b 100644
--- a/src/OSSupport/TCPLinkImpl.cpp
+++ b/src/OSSupport/TCPLinkImpl.cpp
@@ -18,7 +18,7 @@
// cTCPLinkImpl:
cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks):
- super(a_LinkCallbacks),
+ Super(a_LinkCallbacks),
m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), -1, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE | BEV_OPT_DEFER_CALLBACKS | BEV_OPT_UNLOCK_CALLBACKS)),
m_LocalPort(0),
m_RemotePort(0),
@@ -31,7 +31,7 @@ cTCPLinkImpl::cTCPLinkImpl(cTCPLink::cCallbacksPtr a_LinkCallbacks):
cTCPLinkImpl::cTCPLinkImpl(evutil_socket_t a_Socket, cTCPLink::cCallbacksPtr a_LinkCallbacks, cServerHandleImplPtr a_Server, const sockaddr * a_Address, socklen_t a_AddrLen):
- super(a_LinkCallbacks),
+ Super(a_LinkCallbacks),
m_BufferEvent(bufferevent_socket_new(cNetworkSingleton::Get().GetEventBase(), a_Socket, BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE | BEV_OPT_DEFER_CALLBACKS | BEV_OPT_UNLOCK_CALLBACKS)),
m_Server(a_Server),
m_LocalPort(0),
diff --git a/src/OSSupport/TCPLinkImpl.h b/src/OSSupport/TCPLinkImpl.h
index 0bd19b127..4b8c6f308 100644
--- a/src/OSSupport/TCPLinkImpl.h
+++ b/src/OSSupport/TCPLinkImpl.h
@@ -34,9 +34,10 @@ typedef std::vector<cTCPLinkImplPtr> cTCPLinkImplPtrs;
class cTCPLinkImpl:
public cTCPLink
{
- typedef cTCPLink super;
+ using Super = cTCPLink;
public:
+
/** Creates a new link based on the given socket.
Used for connections accepted in a server using cNetwork::Listen().
a_Address and a_AddrLen describe the remote peer that has connected.
diff --git a/src/OSSupport/UDPEndpointImpl.cpp b/src/OSSupport/UDPEndpointImpl.cpp
index 68117e5a0..3235ff91f 100644
--- a/src/OSSupport/UDPEndpointImpl.cpp
+++ b/src/OSSupport/UDPEndpointImpl.cpp
@@ -182,7 +182,7 @@ protected:
// cUDPEndpointImpl:
cUDPEndpointImpl::cUDPEndpointImpl(UInt16 a_Port, cUDPEndpoint::cCallbacks & a_Callbacks):
- super(a_Callbacks),
+ Super(a_Callbacks),
m_Port(0),
m_MainSock(-1),
m_IsMainSockIPv6(true),
diff --git a/src/OSSupport/UDPEndpointImpl.h b/src/OSSupport/UDPEndpointImpl.h
index a6ca37c27..32263d388 100644
--- a/src/OSSupport/UDPEndpointImpl.h
+++ b/src/OSSupport/UDPEndpointImpl.h
@@ -27,9 +27,10 @@ typedef std::shared_ptr<cUDPEndpointImpl> cUDPEndpointImplPtr;
class cUDPEndpointImpl:
public cUDPEndpoint
{
- typedef cUDPEndpoint super;
+ using Super = cUDPEndpoint;
public:
+
/** Creates a new instance of the endpoint, with the specified callbacks.
Tries to open on the specified port; if it fails, the endpoint is left in the "closed" state.
If a_Port is 0, the OS is free to assign any port number it likes to the endpoint. */
diff --git a/src/Protocol/Authenticator.cpp b/src/Protocol/Authenticator.cpp
index 56ef9998c..85c5c920a 100644
--- a/src/Protocol/Authenticator.cpp
+++ b/src/Protocol/Authenticator.cpp
@@ -25,7 +25,7 @@
cAuthenticator::cAuthenticator(void) :
- super("cAuthenticator"),
+ Super("cAuthenticator"),
m_Server(DEFAULT_AUTH_SERVER),
m_Address(DEFAULT_AUTH_ADDRESS),
m_ShouldAuthenticate(true)
@@ -77,7 +77,7 @@ void cAuthenticator::Authenticate(int a_ClientID, const AString & a_UserName, co
void cAuthenticator::Start(cSettingsRepositoryInterface & a_Settings)
{
ReadSettings(a_Settings);
- super::Start();
+ Super::Start();
}
@@ -88,7 +88,7 @@ void cAuthenticator::Stop(void)
{
m_ShouldTerminate = true;
m_QueueNonempty.Set();
- super::Stop();
+ Super::Stop();
}
diff --git a/src/Protocol/Authenticator.h b/src/Protocol/Authenticator.h
index 98bf17512..5fd8e5434 100644
--- a/src/Protocol/Authenticator.h
+++ b/src/Protocol/Authenticator.h
@@ -27,13 +27,14 @@ namespace Json
-class cAuthenticator :
+class cAuthenticator:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
public:
- cAuthenticator(void);
+
+ cAuthenticator();
virtual ~cAuthenticator() override;
/** (Re-)read server and address from INI: */
diff --git a/src/Protocol/MojangAPI.cpp b/src/Protocol/MojangAPI.cpp
index 49e34b66c..be6ee35e2 100644
--- a/src/Protocol/MojangAPI.cpp
+++ b/src/Protocol/MojangAPI.cpp
@@ -228,13 +228,15 @@ cMojangAPI::sProfile::sProfile(
////////////////////////////////////////////////////////////////////////////////
// cMojangAPI::cUpdateThread:
-class cMojangAPI::cUpdateThread :
+class cMojangAPI::cUpdateThread:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
+
public:
- cUpdateThread(cMojangAPI & a_MojangAPI) :
- super("cMojangAPI::cUpdateThread"),
+
+ cUpdateThread(cMojangAPI & a_MojangAPI):
+ Super("cMojangAPI::cUpdateThread"),
m_MojangAPI(a_MojangAPI)
{
}
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 49bab8dfd..1bc6f687a 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -26,7 +26,7 @@
cProtocolRecognizer::cProtocolRecognizer(cClientHandle * a_Client) :
- super(a_Client),
+ Super(a_Client),
m_Buffer(8192), // We need a larger buffer to support BungeeCord - it sends one huge packet at the start
m_InPingForUnrecognizedVersion(false)
{
diff --git a/src/Protocol/ProtocolRecognizer.h b/src/Protocol/ProtocolRecognizer.h
index f1fe59367..e3d0481ae 100644
--- a/src/Protocol/ProtocolRecognizer.h
+++ b/src/Protocol/ProtocolRecognizer.h
@@ -21,7 +21,7 @@ protocol version instance and redirects everything to it. */
class cProtocolRecognizer:
public cProtocol
{
- typedef cProtocol super;
+ using Super = cProtocol;
public:
enum
diff --git a/src/Protocol/Protocol_1_10.h b/src/Protocol/Protocol_1_10.h
index 8b1f58364..9e2849d6f 100644
--- a/src/Protocol/Protocol_1_10.h
+++ b/src/Protocol/Protocol_1_10.h
@@ -19,12 +19,13 @@ Declares the 1.10 protocol classes:
-class cProtocol_1_10_0 :
+class cProtocol_1_10_0:
public cProtocol_1_9_4
{
- typedef cProtocol_1_9_4 Super;
+ using Super = cProtocol_1_9_4;
public:
+
cProtocol_1_10_0(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
virtual void SendSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch) override;
diff --git a/src/Protocol/Protocol_1_11.h b/src/Protocol/Protocol_1_11.h
index 71d0be827..b5c0bbeb8 100644
--- a/src/Protocol/Protocol_1_11.h
+++ b/src/Protocol/Protocol_1_11.h
@@ -21,12 +21,13 @@ Declares the 1.11 protocol classes:
-class cProtocol_1_11_0 :
+class cProtocol_1_11_0:
public cProtocol_1_10_0
{
- typedef cProtocol_1_10_0 Super;
+ using Super = cProtocol_1_10_0;
public:
+
cProtocol_1_11_0(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
virtual void SendCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player, int a_Count) override;
@@ -52,12 +53,13 @@ protected:
-class cProtocol_1_11_1 :
+class cProtocol_1_11_1:
public cProtocol_1_11_0
{
- typedef cProtocol_1_11_0 Super;
+ using Super = cProtocol_1_11_0;
public:
+
cProtocol_1_11_1(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
virtual void HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) override;
diff --git a/src/Protocol/Protocol_1_12.h b/src/Protocol/Protocol_1_12.h
index 56a7b5341..38c025e9e 100644
--- a/src/Protocol/Protocol_1_12.h
+++ b/src/Protocol/Protocol_1_12.h
@@ -24,12 +24,13 @@ Declares the 1.12 protocol classes:
-class cProtocol_1_12 :
+class cProtocol_1_12:
public cProtocol_1_11_1
{
- typedef cProtocol_1_11_1 Super;
+ using Super = cProtocol_1_11_1;
public:
+
cProtocol_1_12(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
protected:
@@ -49,12 +50,13 @@ protected:
-class cProtocol_1_12_1 :
+class cProtocol_1_12_1:
public cProtocol_1_12
{
- typedef cProtocol_1_12 Super;
+ using Super = cProtocol_1_12;
public:
+
cProtocol_1_12_1(cClientHandle * a_Client, const AString &a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
protected:
@@ -71,9 +73,10 @@ protected:
class cProtocol_1_12_2:
public cProtocol_1_12_1
{
- typedef cProtocol_1_12_1 Super;
+ using Super = cProtocol_1_12_1;
public:
+
cProtocol_1_12_2(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State):
Super(a_Client, a_ServerAddress, a_ServerPort, a_State)
{
diff --git a/src/Protocol/Protocol_1_13.h b/src/Protocol/Protocol_1_13.h
index baafd3fd5..3d70f74d7 100644
--- a/src/Protocol/Protocol_1_13.h
+++ b/src/Protocol/Protocol_1_13.h
@@ -28,12 +28,13 @@ class BlockTypePalette;
-class cProtocol_1_13 :
+class cProtocol_1_13:
public cProtocol_1_12_2
{
- typedef cProtocol_1_12_2 Super;
+ using Super = cProtocol_1_12_2;
public:
+
cProtocol_1_13(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
virtual void Initialize(cClientHandle & a_Client) override;
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index c8883544d..d4d25d507 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -108,7 +108,7 @@ extern bool g_ShouldLogCommIn, g_ShouldLogCommOut;
// cProtocol_1_8_0:
cProtocol_1_8_0::cProtocol_1_8_0(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State) :
- super(a_Client),
+ Super(a_Client),
m_ServerAddress(a_ServerAddress),
m_ServerPort(a_ServerPort),
m_State(a_State),
diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h
index e8e0f01e1..b8a94e8b0 100644
--- a/src/Protocol/Protocol_1_8.h
+++ b/src/Protocol/Protocol_1_8.h
@@ -24,10 +24,10 @@ Declares the 1.8 protocol classes:
-class cProtocol_1_8_0 :
+class cProtocol_1_8_0:
public cProtocol
{
- typedef cProtocol super;
+ using Super = cProtocol;
public:
diff --git a/src/Protocol/Protocol_1_9.h b/src/Protocol/Protocol_1_9.h
index 64619ab11..49ae8202a 100644
--- a/src/Protocol/Protocol_1_9.h
+++ b/src/Protocol/Protocol_1_9.h
@@ -30,10 +30,10 @@ Declares the 1.9 protocol classes:
-class cProtocol_1_9_0 :
+class cProtocol_1_9_0:
public cProtocol
{
- typedef cProtocol Super;
+ using Super = cProtocol;
public:
@@ -292,12 +292,13 @@ protected:
/** The version 108 protocol, used by 1.9.1. Uses an int rather than a byte for dimension in join game. */
-class cProtocol_1_9_1 :
+class cProtocol_1_9_1:
public cProtocol_1_9_0
{
- typedef cProtocol_1_9_0 Super;
+ using Super = cProtocol_1_9_0;
public:
+
cProtocol_1_9_1(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
// cProtocol_1_9_0 overrides:
@@ -311,12 +312,13 @@ public:
/** The version 109 protocol, used by 1.9.2. Same as 1.9.1, except the server list ping version number changed with the protocol number. */
-class cProtocol_1_9_2 :
+class cProtocol_1_9_2:
public cProtocol_1_9_1
{
- typedef cProtocol_1_9_1 Super;
+ using Super = cProtocol_1_9_1;
public:
+
cProtocol_1_9_2(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
// cProtocol_1_9_1 overrides:
@@ -329,12 +331,13 @@ public:
/** The version 110 protocol, used by 1.9.3 and 1.9.4. */
-class cProtocol_1_9_4 :
+class cProtocol_1_9_4:
public cProtocol_1_9_2
{
- typedef cProtocol_1_9_2 Super;
+ using Super = cProtocol_1_9_2;
public:
+
cProtocol_1_9_4(cClientHandle * a_Client, const AString & a_ServerAddress, UInt16 a_ServerPort, UInt32 a_State);
// cProtocol_1_9_2 overrides:
diff --git a/src/Server.cpp b/src/Server.cpp
index d371250ab..6eec68a6e 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -76,7 +76,7 @@ public:
// cServer::cTickThread:
cServer::cTickThread::cTickThread(cServer & a_Server) :
- super("ServerTickThread"),
+ Super("ServerTickThread"),
m_Server(a_Server)
{
}
diff --git a/src/Server.h b/src/Server.h
index 28342cfb6..b1329f69b 100644
--- a/src/Server.h
+++ b/src/Server.h
@@ -165,13 +165,16 @@ private:
friend class cRoot; // so cRoot can create and destroy cServer
friend class cServerListenCallbacks; // Accessing OnConnectionAccepted()
+
+
/** The server tick thread takes care of the players who aren't yet spawned in a world */
- class cTickThread :
+ class cTickThread:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
public:
+
cTickThread(cServer & a_Server);
protected:
@@ -182,6 +185,7 @@ private:
} ;
+
/** The network sockets listening for client connections. */
cServerHandlePtrs m_ServerHandles;
diff --git a/src/Simulator/DelayedFluidSimulator.cpp b/src/Simulator/DelayedFluidSimulator.cpp
index c3e262dec..784e40250 100644
--- a/src/Simulator/DelayedFluidSimulator.cpp
+++ b/src/Simulator/DelayedFluidSimulator.cpp
@@ -66,7 +66,7 @@ cDelayedFluidSimulatorChunkData::~cDelayedFluidSimulatorChunkData()
// cDelayedFluidSimulator:
cDelayedFluidSimulator::cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, int a_TickDelay) :
- super(a_World, a_Fluid, a_StationaryFluid),
+ Super(a_World, a_Fluid, a_StationaryFluid),
m_TickDelay(a_TickDelay),
m_AddSlotNum(a_TickDelay - 1),
m_SimSlotNum(0),
diff --git a/src/Simulator/DelayedFluidSimulator.h b/src/Simulator/DelayedFluidSimulator.h
index 78619a608..4627cdce2 100644
--- a/src/Simulator/DelayedFluidSimulator.h
+++ b/src/Simulator/DelayedFluidSimulator.h
@@ -45,12 +45,13 @@ public:
-class cDelayedFluidSimulator :
+class cDelayedFluidSimulator:
public cFluidSimulator
{
- typedef cFluidSimulator super;
+ using Super = cFluidSimulator;
public:
+
cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, int a_TickDelay);
// cSimulator overrides:
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index 14573e0de..c63d7e965 100644
--- a/src/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
@@ -38,7 +38,7 @@ cFloodyFluidSimulator::cFloodyFluidSimulator(
int a_TickDelay,
int a_NumNeighborsForSource
) :
- super(a_World, a_Fluid, a_StationaryFluid, a_TickDelay),
+ Super(a_World, a_Fluid, a_StationaryFluid, a_TickDelay),
m_Falloff(a_Falloff),
m_NumNeighborsForSource(a_NumNeighborsForSource)
{
diff --git a/src/Simulator/FloodyFluidSimulator.h b/src/Simulator/FloodyFluidSimulator.h
index 1139da1fc..6923bb637 100644
--- a/src/Simulator/FloodyFluidSimulator.h
+++ b/src/Simulator/FloodyFluidSimulator.h
@@ -16,15 +16,17 @@
-class cFloodyFluidSimulator :
+class cFloodyFluidSimulator:
public cDelayedFluidSimulator
{
- typedef cDelayedFluidSimulator super;
+ using Super = cDelayedFluidSimulator;
public:
+
cFloodyFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, NIBBLETYPE a_Falloff, int a_TickDelay, int a_NumNeighborsForSource);
protected:
+
NIBBLETYPE m_Falloff;
int m_NumNeighborsForSource;
diff --git a/src/Simulator/FluidSimulator.cpp b/src/Simulator/FluidSimulator.cpp
index 69a8375aa..ca9fa3b1b 100644
--- a/src/Simulator/FluidSimulator.cpp
+++ b/src/Simulator/FluidSimulator.cpp
@@ -8,7 +8,7 @@
cFluidSimulator::cFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid) :
- super(a_World),
+ Super(a_World),
m_FluidBlock(a_Fluid),
m_StationaryFluidBlock(a_StationaryFluid)
{
diff --git a/src/Simulator/FluidSimulator.h b/src/Simulator/FluidSimulator.h
index 7e79c2751..e9157fa69 100644
--- a/src/Simulator/FluidSimulator.h
+++ b/src/Simulator/FluidSimulator.h
@@ -34,12 +34,13 @@ public:
-class cFluidSimulator :
+class cFluidSimulator:
public cSimulator
{
- typedef cSimulator super;
+ using Super = cSimulator;
public:
+
cFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid);
// cSimulator overrides:
diff --git a/src/Simulator/IncrementalRedstoneSimulator/CommandBlockHandler.h b/src/Simulator/IncrementalRedstoneSimulator/CommandBlockHandler.h
index f059c5fb3..6bdd580a9 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/CommandBlockHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/CommandBlockHandler.h
@@ -8,9 +8,11 @@
-class cCommandBlockHandler : public cRedstoneHandler
+class cCommandBlockHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h
index d29a2f4da..ecd1d93b3 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/DoorHandler.h
@@ -8,9 +8,11 @@
-class cDoorHandler : public cRedstoneHandler
+class cDoorHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
index 4dd8b4493..131d2eb6c 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/DropSpenserHandler.h
@@ -8,9 +8,11 @@
-class cDropSpenserHandler : public cRedstoneHandler
+class cDropSpenserHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
inline static bool IsActivated(NIBBLETYPE a_Meta)
diff --git a/src/Simulator/IncrementalRedstoneSimulator/HopperHandler.h b/src/Simulator/IncrementalRedstoneSimulator/HopperHandler.h
index 6012db1e1..32b615ffa 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/HopperHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/HopperHandler.h
@@ -8,9 +8,11 @@
-class cHopperHandler : public cRedstoneHandler
+class cHopperHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h
index 850bb30c4..4ef9801a3 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/IncrementalRedstoneSimulator.h
@@ -8,13 +8,15 @@
-class cIncrementalRedstoneSimulator :
+class cIncrementalRedstoneSimulator:
public cRedstoneSimulator
{
- typedef cRedstoneSimulator super;
+ using Super = cRedstoneSimulator;
+
public:
- cIncrementalRedstoneSimulator(cWorld & a_World) :
- super(a_World)
+
+ cIncrementalRedstoneSimulator(cWorld & a_World):
+ Super(a_World)
{
}
diff --git a/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h b/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
index 347778881..f6dfc7c97 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/NoteBlockHandler.h
@@ -8,9 +8,11 @@
-class cNoteBlockHandler : public cRedstoneHandler
+class cNoteBlockHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/PistonHandler.h b/src/Simulator/IncrementalRedstoneSimulator/PistonHandler.h
index b91596be9..0929951d5 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/PistonHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/PistonHandler.h
@@ -8,9 +8,11 @@
-class cPistonHandler : public cRedstoneHandler
+class cPistonHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/PoweredRailHandler.h b/src/Simulator/IncrementalRedstoneSimulator/PoweredRailHandler.h
index 3c02bf5ec..d1d44a270 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/PoweredRailHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/PoweredRailHandler.h
@@ -7,9 +7,11 @@
-class cPoweredRailHandler : public cRedstoneHandler
+class cPoweredRailHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
static Vector3i GetPoweredRailAdjacentXZCoordinateOffset(NIBBLETYPE a_Meta) // Not in cBlockRailHandler since specific to powered rails
diff --git a/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h b/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h
index 1eeaf2afa..0944c5f8e 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/PressurePlateHandler.h
@@ -9,9 +9,11 @@
-class cPressurePlateHandler : public cRedstoneHandler
+class cPressurePlateHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneBlockHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneBlockHandler.h
index 441f802c3..98d373002 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneBlockHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneBlockHandler.h
@@ -7,9 +7,11 @@
-class cRedstoneBlockHandler : public cRedstoneHandler
+class cRedstoneBlockHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h
index 1f78082c4..3c5dae98f 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneComparatorHandler.h
@@ -8,9 +8,11 @@
-class cRedstoneComparatorHandler : public cRedstoneHandler
+class cRedstoneComparatorHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
unsigned char GetFrontPowerLevel(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, unsigned char a_HighestSidePowerLevel, unsigned char a_HighestRearPowerLevel) const
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneRepeaterHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneRepeaterHandler.h
index 0263d47cf..9a0e26100 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneRepeaterHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneRepeaterHandler.h
@@ -8,9 +8,11 @@
-class cRedstoneRepeaterHandler : public cRedstoneHandler
+class cRedstoneRepeaterHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
inline static bool IsOn(BLOCKTYPE a_Block)
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneToggleHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneToggleHandler.h
index ad64f76db..c56b09c7b 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneToggleHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneToggleHandler.h
@@ -9,9 +9,11 @@
-class cRedstoneToggleHandler : public cRedstoneHandler
+class cRedstoneToggleHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
inline static Vector3i GetPositionAttachedTo(Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta)
diff --git a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
index 09b16fb25..32be166b1 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h
@@ -7,9 +7,11 @@
-class cRedstoneWireHandler : public cRedstoneHandler
+class cRedstoneWireHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
inline static bool IsDirectlyConnectingMechanism(BLOCKTYPE a_Block)
diff --git a/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h b/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h
index 05e21429d..48238f4eb 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/SmallGateHandler.h
@@ -7,9 +7,11 @@
-class cSmallGateHandler : public cRedstoneHandler
+class cSmallGateHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/SolidBlockHandler.h b/src/Simulator/IncrementalRedstoneSimulator/SolidBlockHandler.h
index b8b9b3bed..5b6bafaa3 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/SolidBlockHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/SolidBlockHandler.h
@@ -7,9 +7,11 @@
-class cSolidBlockHandler : public cRedstoneHandler
+class cSolidBlockHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h
index 5c739baba..1ded2a733 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h
@@ -7,9 +7,11 @@
-class cTNTHandler : public cRedstoneHandler
+class cTNTHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/TrappedChestHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TrappedChestHandler.h
index f6bd81930..e8483a73a 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/TrappedChestHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/TrappedChestHandler.h
@@ -8,9 +8,11 @@
-class cTrappedChestHandler : public cRedstoneHandler
+class cTrappedChestHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h
index 132df3327..6a857cd7c 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/TripwireHookHandler.h
@@ -8,9 +8,11 @@
-class cTripwireHookHandler : public cRedstoneHandler
+class cTripwireHookHandler:
+ public cRedstoneHandler
{
- typedef cRedstoneHandler super;
+ using Super = cRedstoneHandler;
+
public:
virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override
diff --git a/src/Simulator/NoopFluidSimulator.h b/src/Simulator/NoopFluidSimulator.h
index 11bbf061d..6fc8b3689 100644
--- a/src/Simulator/NoopFluidSimulator.h
+++ b/src/Simulator/NoopFluidSimulator.h
@@ -15,14 +15,15 @@
-class cNoopFluidSimulator :
+class cNoopFluidSimulator:
public cFluidSimulator
{
- typedef cFluidSimulator super;
+ using Super = cFluidSimulator;
public:
- cNoopFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid) :
- super(a_World, a_Fluid, a_StationaryFluid)
+
+ cNoopFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid):
+ Super(a_World, a_Fluid, a_StationaryFluid)
{
}
diff --git a/src/Simulator/NoopRedstoneSimulator.h b/src/Simulator/NoopRedstoneSimulator.h
index d9e8e00f5..4959882fa 100644
--- a/src/Simulator/NoopRedstoneSimulator.h
+++ b/src/Simulator/NoopRedstoneSimulator.h
@@ -7,14 +7,15 @@
-class cRedstoneNoopSimulator :
+class cRedstoneNoopSimulator:
public cRedstoneSimulator
{
- typedef cRedstoneSimulator super;
+ using Super = cRedstoneSimulator;
+
public:
- cRedstoneNoopSimulator(cWorld & a_World) :
- super(a_World)
+ cRedstoneNoopSimulator(cWorld & a_World):
+ Super(a_World)
{
}
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h
index 8a29d7a29..f90026374 100644
--- a/src/Simulator/RedstoneSimulator.h
+++ b/src/Simulator/RedstoneSimulator.h
@@ -19,14 +19,15 @@ inline cRedstoneSimulatorChunkData::~cRedstoneSimulatorChunkData() {}
-class cRedstoneSimulator :
+class cRedstoneSimulator:
public cSimulator
{
- typedef cSimulator super;
+ using Super = cSimulator;
+
public:
- cRedstoneSimulator(cWorld & a_World) :
- super(a_World)
+ cRedstoneSimulator(cWorld & a_World):
+ Super(a_World)
{
}
diff --git a/src/Simulator/VanillaFluidSimulator.cpp b/src/Simulator/VanillaFluidSimulator.cpp
index 0fc84be59..b1c690785 100644
--- a/src/Simulator/VanillaFluidSimulator.cpp
+++ b/src/Simulator/VanillaFluidSimulator.cpp
@@ -28,7 +28,8 @@ cVanillaFluidSimulator::cVanillaFluidSimulator(
NIBBLETYPE a_Falloff,
int a_TickDelay,
int a_NumNeighborsForSource
-) : super(a_World, a_Fluid, a_StationaryFluid, a_Falloff, a_TickDelay, a_NumNeighborsForSource)
+):
+ Super(a_World, a_Fluid, a_StationaryFluid, a_Falloff, a_TickDelay, a_NumNeighborsForSource)
{
}
diff --git a/src/Simulator/VanillaFluidSimulator.h b/src/Simulator/VanillaFluidSimulator.h
index 1e47c3ddf..96ce8dc70 100644
--- a/src/Simulator/VanillaFluidSimulator.h
+++ b/src/Simulator/VanillaFluidSimulator.h
@@ -13,13 +13,21 @@
-class cVanillaFluidSimulator :
+class cVanillaFluidSimulator:
public cFloodyFluidSimulator
{
- typedef cFloodyFluidSimulator super;
+ using Super = cFloodyFluidSimulator;
public:
- cVanillaFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, NIBBLETYPE a_Falloff, int a_TickDelay, int a_NumNeighborsForSource);
+
+ cVanillaFluidSimulator(
+ cWorld & a_World,
+ BLOCKTYPE a_Fluid,
+ BLOCKTYPE a_StationaryFluid,
+ NIBBLETYPE a_Falloff,
+ int a_TickDelay,
+ int a_NumNeighborsForSource
+ );
protected:
// cFloodyFluidSimulator overrides:
diff --git a/src/Simulator/VaporizeFluidSimulator.cpp b/src/Simulator/VaporizeFluidSimulator.cpp
index 441c0bb6c..d0c590d16 100644
--- a/src/Simulator/VaporizeFluidSimulator.cpp
+++ b/src/Simulator/VaporizeFluidSimulator.cpp
@@ -14,7 +14,7 @@
cVaporizeFluidSimulator::cVaporizeFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid) :
- super(a_World, a_Fluid, a_StationaryFluid)
+ Super(a_World, a_Fluid, a_StationaryFluid)
{
}
diff --git a/src/Simulator/VaporizeFluidSimulator.h b/src/Simulator/VaporizeFluidSimulator.h
index 7a7006309..d3ae28db3 100644
--- a/src/Simulator/VaporizeFluidSimulator.h
+++ b/src/Simulator/VaporizeFluidSimulator.h
@@ -16,12 +16,13 @@
-class cVaporizeFluidSimulator :
+class cVaporizeFluidSimulator:
public cFluidSimulator
{
- typedef cFluidSimulator super;
+ using Super = cFluidSimulator;
public:
+
cVaporizeFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid);
// cSimulator overrides:
diff --git a/src/UI/AnvilWindow.cpp b/src/UI/AnvilWindow.cpp
index daa35cf47..6d1d673df 100644
--- a/src/UI/AnvilWindow.cpp
+++ b/src/UI/AnvilWindow.cpp
@@ -75,7 +75,7 @@ void cAnvilWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_
// Inventory or Hotbar
AreasInOrder.push_back(m_SlotAreas[0]); /* Anvil */
}
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
diff --git a/src/UI/AnvilWindow.h b/src/UI/AnvilWindow.h
index e23c744fe..0b9a0e27e 100644
--- a/src/UI/AnvilWindow.h
+++ b/src/UI/AnvilWindow.h
@@ -15,12 +15,13 @@
-class cAnvilWindow :
+class cAnvilWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cAnvilWindow(int a_BlockX, int a_BlockY, int a_BlockZ);
/** Gets the repaired item name. */
diff --git a/src/UI/BeaconWindow.cpp b/src/UI/BeaconWindow.cpp
index e0e9b9c5c..d72eb5603 100644
--- a/src/UI/BeaconWindow.cpp
+++ b/src/UI/BeaconWindow.cpp
@@ -35,7 +35,7 @@ void cBeaconWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a
// Beacon Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
@@ -54,7 +54,7 @@ void cBeaconWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a
// Hotbar Area
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
}
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
@@ -64,7 +64,7 @@ void cBeaconWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a
void cBeaconWindow::OpenedByPlayer(cPlayer & a_Player)
{
- super::OpenedByPlayer(a_Player);
+ Super::OpenedByPlayer(a_Player);
a_Player.GetClientHandle()->SendWindowProperty(*this, 0, m_Beacon->GetBeaconLevel());
a_Player.GetClientHandle()->SendWindowProperty(*this, 1, m_Beacon->GetPrimaryEffect());
diff --git a/src/UI/BeaconWindow.h b/src/UI/BeaconWindow.h
index 14f7456b4..4b40bd635 100644
--- a/src/UI/BeaconWindow.h
+++ b/src/UI/BeaconWindow.h
@@ -19,7 +19,7 @@
class cBeaconWindow :
public cWindow
{
- using super = cWindow;
+ using Super = cWindow;
public:
cBeaconWindow(cBeaconEntity * a_Beacon);
diff --git a/src/UI/BrewingstandWindow.cpp b/src/UI/BrewingstandWindow.cpp
index 08fb7d93f..928eef7a8 100644
--- a/src/UI/BrewingstandWindow.cpp
+++ b/src/UI/BrewingstandWindow.cpp
@@ -14,7 +14,7 @@
cBrewingstandWindow::cBrewingstandWindow(cBrewingstandEntity * a_Brewingstand):
- super(wtBrewery, "Brewingstand")
+ Super(wtBrewery, "Brewingstand")
{
m_SlotAreas.push_back(new cSlotAreaBrewingstand(a_Brewingstand, *this));
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
@@ -36,13 +36,13 @@ void cBrewingstandWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlay
// Brewing stand Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
else
@@ -63,6 +63,6 @@ void cBrewingstandWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlay
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
}
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/BrewingstandWindow.h b/src/UI/BrewingstandWindow.h
index 9c89d29bd..97838ccfc 100644
--- a/src/UI/BrewingstandWindow.h
+++ b/src/UI/BrewingstandWindow.h
@@ -18,7 +18,7 @@
class cBrewingstandWindow :
public cWindow
{
- using super = cWindow;
+ using Super = cWindow;
public:
diff --git a/src/UI/ChestWindow.cpp b/src/UI/ChestWindow.cpp
index 03347dfed..56c1c96e6 100644
--- a/src/UI/ChestWindow.cpp
+++ b/src/UI/ChestWindow.cpp
@@ -115,13 +115,13 @@ void cChestWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_
// Chest Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Hotbar or Inventory
AreasInOrder.push_back(m_SlotAreas[0]); /* Chest */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/ChestWindow.h b/src/UI/ChestWindow.h
index 932f7a2ec..18f330519 100644
--- a/src/UI/ChestWindow.h
+++ b/src/UI/ChestWindow.h
@@ -15,12 +15,13 @@
-class cChestWindow :
+class cChestWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cChestWindow(cChestEntity * a_Chest);
cChestWindow(cChestEntity * a_PrimaryChest, cChestEntity * a_SecondaryChest);
diff --git a/src/UI/CraftingWindow.cpp b/src/UI/CraftingWindow.cpp
index ca44056f9..b5e7ec5a9 100644
--- a/src/UI/CraftingWindow.cpp
+++ b/src/UI/CraftingWindow.cpp
@@ -40,19 +40,19 @@ void cCraftingWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer &
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
}
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, (a_Slot == 0));
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, (a_Slot == 0));
}
else if (a_ClickedArea == m_SlotAreas[1])
{
// Inventory Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
else
{
// Hotbar
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/CraftingWindow.h b/src/UI/CraftingWindow.h
index 01b2da73a..2412bfdd7 100644
--- a/src/UI/CraftingWindow.h
+++ b/src/UI/CraftingWindow.h
@@ -15,12 +15,13 @@
-class cCraftingWindow :
+class cCraftingWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cCraftingWindow(int a_BlockX, int a_BlockY, int a_BlockZ);
virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
diff --git a/src/UI/DropSpenserWindow.cpp b/src/UI/DropSpenserWindow.cpp
index 38b38e56f..8949d8fe0 100644
--- a/src/UI/DropSpenserWindow.cpp
+++ b/src/UI/DropSpenserWindow.cpp
@@ -12,7 +12,7 @@
cDropSpenserWindow::cDropSpenserWindow(cDropSpenserEntity * a_DropSpenser):
- super(wtDropSpenser, (a_DropSpenser->GetBlockType() == E_BLOCK_DISPENSER) ? "Dispenser" : "Dropper")
+ Super(wtDropSpenser, (a_DropSpenser->GetBlockType() == E_BLOCK_DISPENSER) ? "Dispenser" : "Dropper")
{
m_SlotAreas.push_back(new cSlotAreaItemGrid(a_DropSpenser->GetContents(), *this));
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
@@ -32,13 +32,13 @@ void cDropSpenserWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlaye
// DropSpenser Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Inventory or Hotbar
AreasInOrder.push_back(m_SlotAreas[0]); /* DropSpenser */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/DropSpenserWindow.h b/src/UI/DropSpenserWindow.h
index d24c3b7a3..0fb961712 100644
--- a/src/UI/DropSpenserWindow.h
+++ b/src/UI/DropSpenserWindow.h
@@ -19,7 +19,7 @@
class cDropSpenserWindow :
public cWindow
{
- using super = cWindow;
+ using Super = cWindow;
public:
cDropSpenserWindow(cDropSpenserEntity * a_DropSpenser);
diff --git a/src/UI/EnchantingWindow.cpp b/src/UI/EnchantingWindow.cpp
index 5ac75a2da..3e0f2cd4c 100644
--- a/src/UI/EnchantingWindow.cpp
+++ b/src/UI/EnchantingWindow.cpp
@@ -37,7 +37,7 @@ void cEnchantingWindow::SetProperty(short a_Property, short a_Value, cPlayer & a
}
m_PropertyValue[a_Property] = a_Value;
- super::SetProperty(a_Property, a_Value, a_Player);
+ Super::SetProperty(a_Property, a_Value, a_Player);
}
@@ -53,7 +53,7 @@ void cEnchantingWindow::SetProperty(short a_Property, short a_Value)
}
m_PropertyValue[a_Property] = a_Value;
- super::SetProperty(a_Property, a_Value);
+ Super::SetProperty(a_Property, a_Value);
}
@@ -84,13 +84,13 @@ void cEnchantingWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer
// Enchanting Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Inventory or Hotbar
AreasInOrder.push_back(m_SlotAreas[0]); /* Enchanting */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/EnchantingWindow.h b/src/UI/EnchantingWindow.h
index bf805c6c8..61a40036f 100644
--- a/src/UI/EnchantingWindow.h
+++ b/src/UI/EnchantingWindow.h
@@ -15,12 +15,13 @@
-class cEnchantingWindow :
+class cEnchantingWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ);
virtual void SetProperty(short a_Property, short a_Value, cPlayer & a_Player) override;
diff --git a/src/UI/EnderChestWindow.cpp b/src/UI/EnderChestWindow.cpp
index 9f8a891ad..4b48f7ad2 100644
--- a/src/UI/EnderChestWindow.cpp
+++ b/src/UI/EnderChestWindow.cpp
@@ -63,13 +63,13 @@ void cEnderChestWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer
// Chest Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Hotbar or Inventory
AreasInOrder.push_back(m_SlotAreas[0]); /* Chest */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/EnderChestWindow.h b/src/UI/EnderChestWindow.h
index b14c760e1..491e94a2a 100644
--- a/src/UI/EnderChestWindow.h
+++ b/src/UI/EnderChestWindow.h
@@ -16,12 +16,13 @@
-class cEnderChestWindow :
+class cEnderChestWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cEnderChestWindow(cEnderChestEntity * a_EnderChest);
virtual ~cEnderChestWindow() override;
diff --git a/src/UI/FurnaceWindow.cpp b/src/UI/FurnaceWindow.cpp
index d4447b8ee..7be7a92d6 100644
--- a/src/UI/FurnaceWindow.cpp
+++ b/src/UI/FurnaceWindow.cpp
@@ -37,14 +37,14 @@ void cFurnaceWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer &
// Result Slot
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Furnace Input / Fuel Slot
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
else
@@ -65,7 +65,7 @@ void cFurnaceWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer &
// Hotbar Area
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
}
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/FurnaceWindow.h b/src/UI/FurnaceWindow.h
index d10485563..9cea458f6 100644
--- a/src/UI/FurnaceWindow.h
+++ b/src/UI/FurnaceWindow.h
@@ -18,7 +18,7 @@
class cFurnaceWindow :
public cWindow
{
- using super = cWindow;
+ using Super = cWindow;
public:
cFurnaceWindow(cFurnaceEntity * a_Furnace);
diff --git a/src/UI/HopperWindow.cpp b/src/UI/HopperWindow.cpp
index db79e6857..8ac90401b 100644
--- a/src/UI/HopperWindow.cpp
+++ b/src/UI/HopperWindow.cpp
@@ -14,7 +14,7 @@
cHopperWindow::cHopperWindow(cHopperEntity * a_Hopper):
- super(wtHopper, "Hopper")
+ Super(wtHopper, "Hopper")
{
m_SlotAreas.push_back(new cSlotAreaItemGrid(a_Hopper->GetContents(), *this));
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
@@ -34,13 +34,13 @@ void cHopperWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a
// Hopper Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Inventory or Hotbar
AreasInOrder.push_back(m_SlotAreas[0]); /* Hopper */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/HopperWindow.h b/src/UI/HopperWindow.h
index b4a0cef84..98bfccbb3 100644
--- a/src/UI/HopperWindow.h
+++ b/src/UI/HopperWindow.h
@@ -15,12 +15,13 @@
-class cHopperWindow :
+class cHopperWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cHopperWindow(cHopperEntity * a_Hopper);
virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
diff --git a/src/UI/InventoryWindow.cpp b/src/UI/InventoryWindow.cpp
index 571651d20..3c787ff7c 100644
--- a/src/UI/InventoryWindow.cpp
+++ b/src/UI/InventoryWindow.cpp
@@ -44,28 +44,28 @@ void cInventoryWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer
AreasInOrder.push_back(m_SlotAreas[2]); /* Inventory */
AreasInOrder.push_back(m_SlotAreas[3]); /* Hotbar */
}
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, (a_Slot == 0));
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, (a_Slot == 0));
}
else if (a_ClickedArea == m_SlotAreas[1])
{
// Armor Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Inventory */
AreasInOrder.push_back(m_SlotAreas[3]); /* Hotbar */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
else if (a_ClickedArea == m_SlotAreas[2])
{
// Inventory Area
AreasInOrder.push_back(m_SlotAreas[1]); /* Armor */
AreasInOrder.push_back(m_SlotAreas[3]); /* Hotbar */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
else
{
// Hotbar
AreasInOrder.push_back(m_SlotAreas[1]); /* Armor */
AreasInOrder.push_back(m_SlotAreas[2]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/InventoryWindow.h b/src/UI/InventoryWindow.h
index c02dcfbbb..108f58fa0 100644
--- a/src/UI/InventoryWindow.h
+++ b/src/UI/InventoryWindow.h
@@ -15,12 +15,13 @@
-class cInventoryWindow :
+class cInventoryWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cInventoryWindow(cPlayer & a_Player);
virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
diff --git a/src/UI/MinecartWithChestWindow.h b/src/UI/MinecartWithChestWindow.h
index 80d1ebfce..7303ecf96 100644
--- a/src/UI/MinecartWithChestWindow.h
+++ b/src/UI/MinecartWithChestWindow.h
@@ -16,12 +16,13 @@
-class cMinecartWithChestWindow :
+class cMinecartWithChestWindow:
public cWindow
{
- typedef cWindow super;
+ using Super = cWindow;
public:
+
cMinecartWithChestWindow(cMinecartWithChest * a_ChestCart) :
cWindow(wtChest, "Minecart with Chest"),
m_ChestCart(a_ChestCart)
@@ -42,13 +43,13 @@ public:
// Chest Area
AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
}
else
{
// Hotbar or Inventory
AreasInOrder.push_back(m_SlotAreas[0]); /* Chest */
- super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 84e6efb77..5c00c918e 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -543,7 +543,7 @@ void cSlotAreaCrafting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction
return;
}
- super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
+ Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
UpdateRecipe(a_Player);
}
@@ -558,7 +558,7 @@ void cSlotAreaCrafting::DblClicked(cPlayer & a_Player, int a_SlotNum)
// Dbl-clicking the crafting result slot shouldn't collect items to hand
return;
}
- super::DblClicked(a_Player, a_SlotNum);
+ Super::DblClicked(a_Player, a_SlotNum);
}
@@ -590,7 +590,7 @@ void cSlotAreaCrafting::OnPlayerRemoved(cPlayer & a_Player)
void cSlotAreaCrafting::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
{
// Update the recipe after setting the slot, if the slot is not the result slot:
- super::SetSlot(a_SlotNum, a_Player, a_Item);
+ Super::SetSlot(a_SlotNum, a_Player, a_Item);
if (a_SlotNum != 0)
{
UpdateRecipe(a_Player);
@@ -799,7 +799,7 @@ void cSlotAreaAnvil::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C
ASSERT((a_SlotNum >= 0) && (a_SlotNum < GetNumSlots()));
if (a_SlotNum != 2)
{
- super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
+ Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
UpdateResult(a_Player);
return;
}
@@ -895,7 +895,7 @@ void cSlotAreaAnvil::ShiftClicked(cPlayer & a_Player, int a_SlotNum, const cItem
{
if (a_SlotNum != 2)
{
- super::ShiftClicked(a_Player, a_SlotNum, a_ClickedItem);
+ Super::ShiftClicked(a_Player, a_SlotNum, a_ClickedItem);
UpdateResult(a_Player);
return;
}
@@ -1052,7 +1052,7 @@ bool cSlotAreaAnvil::CanTakeResultItem(cPlayer & a_Player)
void cSlotAreaAnvil::OnPlayerRemoved(cPlayer & a_Player)
{
TossItems(a_Player, 0, 2);
- super::OnPlayerRemoved(a_Player);
+ Super::OnPlayerRemoved(a_Player);
}
@@ -1580,7 +1580,7 @@ void cSlotAreaEnchanting::DistributeStack(cItem & a_ItemStack, cPlayer & a_Playe
void cSlotAreaEnchanting::OnPlayerAdded(cPlayer & a_Player)
{
- super::OnPlayerAdded(a_Player);
+ Super::OnPlayerAdded(a_Player);
UpdateResult(a_Player);
}
@@ -1593,7 +1593,7 @@ void cSlotAreaEnchanting::OnPlayerRemoved(cPlayer & a_Player)
// Toss the item in the enchanting slot, as well as lapis
TossItems(a_Player, 0, m_NumSlots);
- super::OnPlayerRemoved(a_Player);
+ Super::OnPlayerRemoved(a_Player);
}
@@ -1602,7 +1602,7 @@ void cSlotAreaEnchanting::OnPlayerRemoved(cPlayer & a_Player)
void cSlotAreaEnchanting::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
{
- super::SetSlot(a_SlotNum, a_Player, a_Item);
+ Super::SetSlot(a_SlotNum, a_Player, a_Item);
UpdateResult(a_Player);
}
@@ -1878,7 +1878,7 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a
return;
}
- super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
+ Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
}
@@ -2056,7 +2056,7 @@ void cSlotAreaBrewingstand::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAct
{
HandleBrewedItem(a_Player, Slot);
}
- super::ShiftClicked(a_Player, a_SlotNum, Slot);
+ Super::ShiftClicked(a_Player, a_SlotNum, Slot);
break;
}
default:
@@ -2079,7 +2079,7 @@ void cSlotAreaBrewingstand::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAct
case caShiftLeftClick:
case caShiftRightClick:
{
- super::ShiftClicked(a_Player, a_SlotNum, Slot);
+ Super::ShiftClicked(a_Player, a_SlotNum, Slot);
break;
}
default:
@@ -2102,7 +2102,7 @@ void cSlotAreaBrewingstand::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAct
case caShiftLeftClick:
case caShiftRightClick:
{
- super::ShiftClicked(a_Player, a_SlotNum, Slot);
+ Super::ShiftClicked(a_Player, a_SlotNum, Slot);
break;
}
default:
@@ -2117,7 +2117,7 @@ void cSlotAreaBrewingstand::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAct
}
}
- super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
+ Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
}
@@ -2296,7 +2296,7 @@ void cSlotAreaInventoryBase::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAc
}
// Survival inventory and all other windows' inventory has the same handling as normal slot areas
- super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
+ Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem);
return;
}
@@ -2469,7 +2469,7 @@ bool cSlotAreaArmor::CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item)
// cSlotAreaItemGrid:
cSlotAreaItemGrid::cSlotAreaItemGrid(cItemGrid & a_ItemGrid, cWindow & a_ParentWindow) :
- super(a_ItemGrid.GetNumSlots(), a_ParentWindow),
+ Super(a_ItemGrid.GetNumSlots(), a_ParentWindow),
m_ItemGrid(a_ItemGrid)
{
m_ItemGrid.AddListener(*this);
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index 4463cb315..a744fea2c 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -91,12 +91,13 @@ protected:
/** Handles any part of the inventory, using parameters in constructor to distinguish between the parts */
-class cSlotAreaInventoryBase :
+class cSlotAreaInventoryBase:
public cSlotArea
{
- typedef cSlotArea super;
+ using Super = cSlotArea;
public:
+
cSlotAreaInventoryBase(int a_NumSlots, int a_SlotOffset, cWindow & a_ParentWindow);
// Creative inventory's click handling is somewhat different from survival inventory's, handle that here:
@@ -114,14 +115,15 @@ protected:
/** Handles the main inventory of each player, excluding the armor and hotbar */
-class cSlotAreaInventory :
+class cSlotAreaInventory:
public cSlotAreaInventoryBase
{
- typedef cSlotAreaInventoryBase super;
+ using Super = cSlotAreaInventoryBase;
public:
- cSlotAreaInventory(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(cInventory::invInventoryCount, cInventory::invInventoryOffset, a_ParentWindow)
+
+ cSlotAreaInventory(cWindow & a_ParentWindow):
+ Super(cInventory::invInventoryCount, cInventory::invInventoryOffset, a_ParentWindow)
{
}
} ;
@@ -131,14 +133,14 @@ public:
/** Handles the hotbar of each player */
-class cSlotAreaHotBar :
+class cSlotAreaHotBar:
public cSlotAreaInventoryBase
{
- typedef cSlotAreaInventoryBase super;
+ using Super = cSlotAreaInventoryBase;
public:
- cSlotAreaHotBar(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(cInventory::invHotbarCount, cInventory::invHotbarOffset, a_ParentWindow)
+ cSlotAreaHotBar(cWindow & a_ParentWindow):
+ Super(cInventory::invHotbarCount, cInventory::invHotbarOffset, a_ParentWindow)
{
}
} ;
@@ -148,14 +150,15 @@ public:
/** Handles the shield of each player */
-class cSlotAreaShield :
+class cSlotAreaShield:
public cSlotAreaInventoryBase
{
- typedef cSlotAreaInventoryBase super;
+ using Super = cSlotAreaInventoryBase;
public:
- cSlotAreaShield(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(cInventory::invShieldCount, cInventory::invShieldOffset, a_ParentWindow)
+
+ cSlotAreaShield(cWindow & a_ParentWindow):
+ Super(cInventory::invShieldCount, cInventory::invShieldOffset, a_ParentWindow)
{
}
};
@@ -165,12 +168,15 @@ public:
/** Handles the armor area of the player's inventory */
-class cSlotAreaArmor :
+class cSlotAreaArmor:
public cSlotAreaInventoryBase
{
+ using Super = cSlotAreaInventoryBase;
+
public:
- cSlotAreaArmor(cWindow & a_ParentWindow) :
- cSlotAreaInventoryBase(cInventory::invArmorCount, cInventory::invArmorOffset, a_ParentWindow)
+
+ cSlotAreaArmor(cWindow & a_ParentWindow):
+ Super(cInventory::invArmorCount, cInventory::invArmorOffset, a_ParentWindow)
{
}
@@ -188,13 +194,14 @@ public:
/** Handles any slot area that is representing a cItemGrid; same items for all the players */
-class cSlotAreaItemGrid :
+class cSlotAreaItemGrid:
public cSlotArea,
public cItemGrid::cListener
{
- typedef cSlotArea super;
+ using Super = cSlotArea;
public:
+
cSlotAreaItemGrid(cItemGrid & a_ItemGrid, cWindow & a_ParentWindow);
virtual ~cSlotAreaItemGrid() override;
@@ -216,12 +223,13 @@ protected:
/** A cSlotArea with items layout that is private to each player and is temporary, such as
a crafting grid or an enchantment table.
This common ancestor stores the items in a per-player map. It also implements tossing items from the map. */
-class cSlotAreaTemporary :
+class cSlotAreaTemporary:
public cSlotArea
{
- typedef cSlotArea super;
+ using Super = cSlotArea;
public:
+
cSlotAreaTemporary(int a_NumSlots, cWindow & a_ParentWindow);
// cSlotArea overrides:
@@ -234,7 +242,7 @@ public:
void TossItems(cPlayer & a_Player, int a_Begin, int a_End);
protected:
- typedef std::map<UInt32, std::vector<cItem> > cItemMap; // Maps EntityID -> items
+ using cItemMap = std::map<UInt32, std::vector<cItem> >; // Maps EntityID -> items
cItemMap m_Items;
@@ -246,12 +254,13 @@ protected:
-class cSlotAreaCrafting :
+class cSlotAreaCrafting:
public cSlotAreaTemporary
{
- typedef cSlotAreaTemporary super;
+ using Super = cSlotAreaTemporary;
public:
+
/** a_GridSize is allowed to be only 2 or 3 */
cSlotAreaCrafting(int a_GridSize, cWindow & a_ParentWindow);
@@ -298,12 +307,13 @@ protected:
-class cSlotAreaAnvil :
+class cSlotAreaAnvil:
public cSlotAreaTemporary
{
- typedef cSlotAreaTemporary super;
+ using Super = cSlotAreaTemporary;
public:
+
cSlotAreaAnvil(cWindow & a_ParentWindow);
// cSlotArea overrides:
@@ -335,13 +345,14 @@ protected:
-class cSlotAreaBeacon :
+class cSlotAreaBeacon:
public cSlotArea,
public cItemGrid::cListener
{
- typedef cSlotArea super;
+ using Super = cSlotArea;
public:
+
cSlotAreaBeacon(cBeaconEntity * a_Beacon, cWindow & a_ParentWindow);
virtual ~cSlotAreaBeacon() override;
@@ -363,12 +374,13 @@ protected:
-class cSlotAreaEnchanting :
+class cSlotAreaEnchanting:
public cSlotAreaTemporary
{
- typedef cSlotAreaTemporary super;
+ using Super = cSlotAreaTemporary;
public:
+
cSlotAreaEnchanting(cWindow & a_ParentWindow, int a_BlockX, int a_BlockY, int a_BlockZ);
// cSlotArea overrides:
@@ -446,13 +458,14 @@ protected:
-class cSlotAreaFurnace :
+class cSlotAreaFurnace:
public cSlotArea,
public cItemGrid::cListener
{
- typedef cSlotArea super;
+ using Super = cSlotArea;
public:
+
cSlotAreaFurnace(cFurnaceEntity * a_Furnace, cWindow & a_ParentWindow);
virtual ~cSlotAreaFurnace() override;
@@ -476,13 +489,14 @@ protected:
-class cSlotAreaBrewingstand :
+class cSlotAreaBrewingstand:
public cSlotArea,
public cItemGrid::cListener
{
- typedef cSlotArea super;
+ using Super = cSlotArea;
public:
+
cSlotAreaBrewingstand(cBrewingstandEntity * a_Brewingstand, cWindow & a_ParentWindow);
virtual ~cSlotAreaBrewingstand() override;
diff --git a/src/World.cpp b/src/World.cpp
index f4f7668b4..0cbe0e445 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -90,7 +90,7 @@ namespace World
// cWorld::cLock:
cWorld::cLock::cLock(cWorld & a_World) :
- super(&(a_World.m_ChunkMap->GetCS()))
+ Super(&(a_World.m_ChunkMap->GetCS()))
{
}
@@ -102,7 +102,7 @@ cWorld::cLock::cLock(cWorld & a_World) :
// cWorld::cTickThread:
cWorld::cTickThread::cTickThread(cWorld & a_World) :
- super(Printf("WorldTickThread: %s", a_World.GetName().c_str())),
+ Super(Printf("WorldTickThread: %s", a_World.GetName().c_str())),
m_World(a_World)
{
}
diff --git a/src/World.h b/src/World.h
index bf8c08b64..973ccc117 100644
--- a/src/World.h
+++ b/src/World.h
@@ -73,15 +73,19 @@ class cWorld // tolua_export
public:
// tolua_end
+
+
/** A simple RAII locker for the chunkmap - locks the chunkmap in its constructor, unlocks it in the destructor */
- class cLock :
+ class cLock:
public cCSLock
{
- typedef cCSLock super;
+ using Super = cCSLock;
public:
cLock(cWorld & a_World);
};
+
+
static const char * GetClassStatic(void) // Needed for ManualBindings's ForEach templates
{
return "cWorld";
@@ -1098,11 +1102,15 @@ private:
friend class cRoot;
- class cTickThread :
+
+
+ class cTickThread:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
+
public:
+
cTickThread(cWorld & a_World);
protected:
@@ -1112,6 +1120,8 @@ private:
virtual void Execute(void) override;
} ;
+
+
/** Implementation of the callbacks that the ChunkGenerator uses to store new chunks and interface to plugins */
class cChunkGeneratorCallbacks :
public cChunkGeneratorThread::cChunkSink,
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 9915e9eb7..96b8874a1 100755
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -80,7 +80,7 @@ Since only the header is actually in the memory, this number can be high, but st
// cWSSAnvil:
cWSSAnvil::cWSSAnvil(cWorld * a_World, int a_CompressionFactor) :
- super(a_World),
+ Super(a_World),
m_CompressionFactor(a_CompressionFactor)
{
// Create a level.dat file for mapping tools, if it doesn't already exist:
diff --git a/src/WorldStorage/WSSAnvil.h b/src/WorldStorage/WSSAnvil.h
index caee4ade2..8c3fda2d7 100755
--- a/src/WorldStorage/WSSAnvil.h
+++ b/src/WorldStorage/WSSAnvil.h
@@ -44,10 +44,10 @@ enum
-class cWSSAnvil :
+class cWSSAnvil:
public cWSSchema
{
- typedef cWSSchema super;
+ using Super = cWSSchema;
public:
diff --git a/src/WorldStorage/WorldStorage.cpp b/src/WorldStorage/WorldStorage.cpp
index d1f9abf74..63e6e9625 100644
--- a/src/WorldStorage/WorldStorage.cpp
+++ b/src/WorldStorage/WorldStorage.cpp
@@ -38,7 +38,7 @@ protected:
// cWorldStorage:
cWorldStorage::cWorldStorage(void) :
- super("cWorldStorage"),
+ Super("cWorldStorage"),
m_World(nullptr),
m_SaveSchema(nullptr)
{
@@ -94,7 +94,7 @@ void cWorldStorage::WaitForFinish(void)
// Wait for the thread to finish:
m_ShouldTerminate = true;
m_Event.Set(); // Wake up the thread if waiting
- super::Stop();
+ Super::Stop();
LOGD("World storage thread finished");
}
diff --git a/src/WorldStorage/WorldStorage.h b/src/WorldStorage/WorldStorage.h
index a7d3bb1d4..1cdf75542 100644
--- a/src/WorldStorage/WorldStorage.h
+++ b/src/WorldStorage/WorldStorage.h
@@ -51,14 +51,14 @@ typedef std::list<cWSSchema *> cWSSchemaList;
/** The actual world storage class */
-class cWorldStorage :
+class cWorldStorage:
public cIsThread
{
- typedef cIsThread super;
+ using Super = cIsThread;
public:
- cWorldStorage(void);
+ cWorldStorage();
virtual ~cWorldStorage() override;
/** Queues a chunk to be loaded, asynchronously.
diff --git a/src/mbedTLS++/BufferedSslContext.h b/src/mbedTLS++/BufferedSslContext.h
index 6facb5915..f48552882 100644
--- a/src/mbedTLS++/BufferedSslContext.h
+++ b/src/mbedTLS++/BufferedSslContext.h
@@ -16,12 +16,13 @@
-class cBufferedSslContext :
+class cBufferedSslContext:
public cSslContext
{
- typedef cSslContext super;
+ using Super = cSslContext;
public:
+
/** Creates a new context with the buffers of specified size for the encrypted / decrypted data. */
cBufferedSslContext(size_t a_BufferSize = 64000);