1
0

CheckBasicStyle: Check number of empty lines between functions (#4267)

Add check for number of empty lines between functions and fix the corresponding failures
This commit is contained in:
peterbell10
2018-07-26 22:24:36 +01:00
committed by GitHub
parent b8ab03bc6b
commit 950aeffff8
121 changed files with 192 additions and 166 deletions

View File

@@ -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())

View File

@@ -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);

View File

@@ -8,8 +8,6 @@
cCow::cCow(void) :
super("Cow", mtCow, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3)
{

View File

@@ -97,6 +97,7 @@ void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk)
{
if (GetTarget() != nullptr)

View File

@@ -27,6 +27,8 @@ void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
AString cMagmaCube::GetSizeName(int a_Size)
{
if (a_Size == 1)

View File

@@ -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:

View File

@@ -8,11 +8,6 @@
cMooshroom::cMooshroom(void) :
super("Mooshroom", mtMooshroom, "entity.cow.hurt", "entity.cow.death", 0.9, 1.3)
{

View File

@@ -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;

View File

@@ -182,6 +182,7 @@ void cVillager::HandleFarmerTryHarvestCrops()
void cVillager::HandleFarmerPlaceCrops()
{
// Check if there is still farmland at the spot where the crops were.

View File

@@ -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())