From 950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Thu, 26 Jul 2018 22:24:36 +0100 Subject: CheckBasicStyle: Check number of empty lines between functions (#4267) Add check for number of empty lines between functions and fix the corresponding failures --- src/Mobs/AggressiveMonster.cpp | 1 - src/Mobs/Chicken.cpp | 3 +-- src/Mobs/Cow.cpp | 2 -- src/Mobs/Enderman.cpp | 1 + src/Mobs/MagmaCube.cpp | 2 ++ src/Mobs/Monster.cpp | 2 +- src/Mobs/Mooshroom.cpp | 5 ----- src/Mobs/Path.cpp | 6 ++++++ src/Mobs/Villager.cpp | 1 + src/Mobs/Wolf.cpp | 6 ++++++ 10 files changed, 18 insertions(+), 11 deletions(-) (limited to 'src/Mobs') diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp index fec14e6e9..9b13615de 100644 --- a/src/Mobs/AggressiveMonster.cpp +++ b/src/Mobs/AggressiveMonster.cpp @@ -36,7 +36,6 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt, cChunk & - void cAggressiveMonster::EventSeePlayer(cPlayer * a_Player, cChunk & a_Chunk) { if (!a_Player->CanMobsTarget()) diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp index 242fe5aa0..1810a295f 100644 --- a/src/Mobs/Chicken.cpp +++ b/src/Mobs/Chicken.cpp @@ -7,8 +7,6 @@ - - cChicken::cChicken(void) : super("Chicken", mtChicken, "entity.chicken.hurt", "entity.chicken.death", 0.4, 0.7), m_EggDropTimer(0) @@ -20,6 +18,7 @@ cChicken::cChicken(void) : + void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { super::Tick(a_Dt, a_Chunk); diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp index 003159959..fbfa3bf22 100644 --- a/src/Mobs/Cow.cpp +++ b/src/Mobs/Cow.cpp @@ -8,8 +8,6 @@ - - cCow::cCow(void) : super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3) { diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp index 71ba4e79a..ff4ad4f69 100644 --- a/src/Mobs/Enderman.cpp +++ b/src/Mobs/Enderman.cpp @@ -97,6 +97,7 @@ void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer) + void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk) { if (GetTarget() != nullptr) diff --git a/src/Mobs/MagmaCube.cpp b/src/Mobs/MagmaCube.cpp index 4d70a0291..4247cbe1f 100644 --- a/src/Mobs/MagmaCube.cpp +++ b/src/Mobs/MagmaCube.cpp @@ -27,6 +27,8 @@ void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer) + + AString cMagmaCube::GetSizeName(int a_Size) { if (a_Size == 1) diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 0d6b8e777..3c202d693 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1079,7 +1079,6 @@ int cMonster::GetSpawnDelay(cMonster::eFamily a_MobFamily) - /** Sets the target. */ void cMonster::SetTarget (cPawn * a_NewTarget) { @@ -1347,6 +1346,7 @@ void cMonster::HandleDaylightBurning(cChunk & a_Chunk, bool WouldBurn) + bool cMonster::WouldBurnAt(Vector3d a_Location, cChunk & a_Chunk) { // If the Y coord is out of range, return the most logical result without considering anything else: diff --git a/src/Mobs/Mooshroom.cpp b/src/Mobs/Mooshroom.cpp index a468a7282..8be0c44dd 100644 --- a/src/Mobs/Mooshroom.cpp +++ b/src/Mobs/Mooshroom.cpp @@ -8,11 +8,6 @@ - - - - - cMooshroom::cMooshroom(void) : super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3) { diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp index 9c423684f..fa57fa1ca 100644 --- a/src/Mobs/Path.cpp +++ b/src/Mobs/Path.cpp @@ -66,6 +66,10 @@ cPath::cPath( ProcessCell(GetCell(m_Source), nullptr, 0); } + + + + cPath::cPath() : m_IsValid(false) { @@ -73,6 +77,8 @@ cPath::cPath() : m_IsValid(false) + + ePathFinderStatus cPath::CalculationStep(cChunk & a_Chunk) { m_Chunk = &a_Chunk; diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp index 26462ba31..9c5ec8c39 100644 --- a/src/Mobs/Villager.cpp +++ b/src/Mobs/Villager.cpp @@ -182,6 +182,7 @@ void cVillager::HandleFarmerTryHarvestCrops() + void cVillager::HandleFarmerPlaceCrops() { // Check if there is still farmland at the spot where the crops were. diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp index ffeb8cf90..401175bf0 100644 --- a/src/Mobs/Wolf.cpp +++ b/src/Mobs/Wolf.cpp @@ -88,6 +88,10 @@ void cWolf::NotifyAlliesOfFight(cPawn * a_Opponent) ); } + + + + bool cWolf::Attack(std::chrono::milliseconds a_Dt) { UNUSED(a_Dt); @@ -384,6 +388,8 @@ void cWolf::TickFollowPlayer() + + void cWolf::InStateIdle(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { if (!IsTame()) -- cgit v1.2.3