From 9ee47e59995f858ec531b3ee467f131594e4ba1f Mon Sep 17 00:00:00 2001 From: Mattes D Date: Mon, 13 Apr 2020 18:38:06 +0200 Subject: Using Super. --- src/Items/ItemThrowable.h | 58 +++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'src/Items/ItemThrowable.h') 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) { } -- cgit v1.2.3