chore(Apps/Codestyle): add new codestyle checks for pointers and range loops (#19841)

* chore(Apps/Codestyle): add new codestyle checks for pointers and range loops

* revert a typo
This commit is contained in:
Grimdhex
2024-09-03 18:02:38 +02:00
committed by GitHub
parent c929b95172
commit 221dbd3fdb
18 changed files with 52 additions and 29 deletions

View File

@@ -159,7 +159,7 @@ public:
return false;
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
for (const auto& itr : pList)
for (auto const& itr : pList)
{
Player* player = itr.GetSource();
if (!player || !player->IsAlive())

View File

@@ -387,7 +387,7 @@ public:
{
bool checklife = false;
bool checkdead = false;
for (const auto& i : PlayerList)
for (auto const& i : PlayerList)
{
Player* player = i.GetSource();
if (player->IsAlive() &&

View File

@@ -228,7 +228,7 @@ public:
case EVENT_SAFETY_DANCE:
{
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
for (const auto& itr : pList)
for (auto const& itr : pList)
{
if (IsInRoom(itr.GetSource()) && !itr.GetSource()->IsAlive())
{

View File

@@ -142,7 +142,7 @@ public:
if (PlList.IsEmpty())
return;
for (const auto& i : PlList)
for (auto const& i : PlList)
{
if (Player* player = i.GetSource())
{
@@ -400,7 +400,7 @@ public:
case EVENT_HUNDRED_CLUB:
{
Map::PlayerList const& pList = me->GetMap()->GetPlayers();
for (const auto& itr : pList)
for (auto const& itr : pList)
{
if (itr.GetSource()->GetResistance(SPELL_SCHOOL_FROST) > 100 && pInstance)
{