mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
feat(CI): add cppcheck (#15211)
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
@@ -129,12 +129,12 @@ void AutobroadcastMgr::SendAutobroadcasts()
|
||||
LOG_DEBUG("autobroadcast", "AutobroadcastMgr::SendAutobroadcasts: '{}'", msg);
|
||||
}
|
||||
|
||||
void AutobroadcastMgr::SendWorldAnnouncement(std::string_view msg)
|
||||
void AutobroadcastMgr::SendWorldAnnouncement(std::string msg)
|
||||
{
|
||||
sWorld->SendWorldTextOptional(LANG_AUTO_BROADCAST, ANNOUNCER_FLAG_DISABLE_AUTOBROADCAST, msg.data());
|
||||
}
|
||||
|
||||
void AutobroadcastMgr::SendNotificationAnnouncement(std::string_view msg)
|
||||
void AutobroadcastMgr::SendNotificationAnnouncement(std::string msg)
|
||||
{
|
||||
WorldPacket data(SMSG_NOTIFICATION, (msg.size() + 1));
|
||||
data << msg.data();
|
||||
|
||||
@@ -37,8 +37,8 @@ public:
|
||||
void SendAutobroadcasts();
|
||||
|
||||
private:
|
||||
void SendWorldAnnouncement(std::string_view msg);
|
||||
void SendNotificationAnnouncement(std::string_view msg);
|
||||
void SendWorldAnnouncement(std::string msg);
|
||||
void SendNotificationAnnouncement(std::string msg);
|
||||
|
||||
typedef std::map<uint8, std::string> AutobroadcastsMap;
|
||||
typedef std::map<uint8, uint8> AutobroadcastsWeightMap;
|
||||
|
||||
@@ -895,8 +895,8 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId
|
||||
{
|
||||
if (!(*itr3)->IsInvitedToBGInstanceGUID
|
||||
&& (((*itr3)->ArenaMatchmakerRating >= arenaMinRating && (*itr3)->ArenaMatchmakerRating <= arenaMaxRating) || (int32)(*itr3)->JoinTime < discardTime)
|
||||
&& ((*itr_teams[0])->ArenaTeamId != (*itr3)->PreviousOpponentsTeamId || ((int32)(*itr3)->JoinTime < discardOpponentsTime))
|
||||
&& (*itr_teams[0])->ArenaTeamId != (*itr3)->ArenaTeamId)
|
||||
&& ((*(itr_teams[0]))->ArenaTeamId != (*itr3)->PreviousOpponentsTeamId || ((int32)(*itr3)->JoinTime < discardOpponentsTime))
|
||||
&& (*(itr_teams[0]))->ArenaTeamId != (*itr3)->ArenaTeamId)
|
||||
{
|
||||
itr_teams[found++] = itr3;
|
||||
break;
|
||||
@@ -907,8 +907,8 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId
|
||||
//if we have 2 teams, then start new arena and invite players!
|
||||
if (found == 2)
|
||||
{
|
||||
GroupQueueInfo* aTeam = *itr_teams[TEAM_ALLIANCE];
|
||||
GroupQueueInfo* hTeam = *itr_teams[TEAM_HORDE];
|
||||
GroupQueueInfo* aTeam = *(itr_teams[TEAM_ALLIANCE]);
|
||||
GroupQueueInfo* hTeam = *(itr_teams[TEAM_HORDE]);
|
||||
|
||||
Battleground* arena = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, arenaType, true);
|
||||
if (!arena)
|
||||
|
||||
@@ -1310,6 +1310,7 @@ bool Player::SatisfyQuestSeasonal(Quest const* qInfo, bool /*msg*/) const
|
||||
if (!qInfo->IsSeasonal() || m_seasonalquests.empty())
|
||||
return true;
|
||||
|
||||
// cppcheck-suppress mismatchingContainers
|
||||
Player::SeasonalEventQuestMap::iterator itr = ((Player*)this)->m_seasonalquests.find(qInfo->GetEventIdForQuest());
|
||||
|
||||
if (itr == m_seasonalquests.end() || itr->second.empty())
|
||||
|
||||
@@ -190,6 +190,7 @@ uint32 LootStore::LoadLootTable()
|
||||
|
||||
// Looking for the template of the entry
|
||||
// often entries are put together
|
||||
// cppcheck-suppress eraseDereference
|
||||
if (m_LootTemplates.empty() || tab->first != entry)
|
||||
{
|
||||
// Searching the template (in case template Id changed)
|
||||
|
||||
Reference in New Issue
Block a user