mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Fixed clang 15 warnings
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
class BigNumber;
|
||||
|
||||
@@ -1075,7 +1075,6 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& indexTableSize, char**& i
|
||||
memset(dataTable, 0, (records + _copyTable.size()) * recordsize);
|
||||
|
||||
uint32 offset = 0;
|
||||
uint32 recordNum = 0;
|
||||
uint32 y = 0;
|
||||
|
||||
for (uint32 section = 0; section < _header->SectionCount; ++section)
|
||||
@@ -1176,8 +1175,6 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& indexTableSize, char**& i
|
||||
++fieldIndex;
|
||||
}
|
||||
}
|
||||
|
||||
++recordNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class MPSCQueueIntrusive
|
||||
using Atomic = std::atomic<T*>;
|
||||
|
||||
public:
|
||||
MPSCQueueIntrusive() : _dummyPtr(reinterpret_cast<T*>(_dummy.data())), _head(_dummyPtr), _tail(_dummyPtr)
|
||||
MPSCQueueIntrusive() : _dummy(), _dummyPtr(reinterpret_cast<T*>(_dummy.data())), _head(_dummyPtr), _tail(_dummyPtr)
|
||||
{
|
||||
// _dummy is constructed from raw byte array and is intentionally left uninitialized (it might not be default constructible)
|
||||
// so we init only its IntrusiveLink here
|
||||
|
||||
@@ -52,7 +52,9 @@ namespace Trinity
|
||||
|
||||
TC_COMMON_API Optional<int64> MoneyStringToMoney(std::string const& moneyString);
|
||||
|
||||
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
|
||||
TC_COMMON_API struct tm* localtime_r(time_t const* time, struct tm *result);
|
||||
#endif
|
||||
TC_COMMON_API time_t LocalTimeToUTCTime(time_t time);
|
||||
TC_COMMON_API time_t GetLocalHourTimestamp(time_t time, uint8 hour, bool onlyAfterTime = true);
|
||||
TC_COMMON_API tm TimeBreakdown(time_t t);
|
||||
|
||||
@@ -1686,7 +1686,7 @@ void DB2Manager::LoadHotfixData()
|
||||
if (DB2StorageBase* store = Trinity::Containers::MapGetValuePtr(_stores, itr->first.first))
|
||||
store->EraseRecord(itr->first.second);
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded {} hotfix records in {} ms", _hotfixData.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
TC_LOG_INFO("server.loading", ">> Loaded {} hotfix records in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
void DB2Manager::LoadHotfixBlob(uint32 localeMask)
|
||||
|
||||
@@ -3343,7 +3343,6 @@ struct ItemSpecStats
|
||||
void ObjectMgr::LoadItemTemplates()
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
uint32 sparseCount = 0;
|
||||
|
||||
for (ItemSparseEntry const* sparse : sItemSparseStore)
|
||||
{
|
||||
@@ -3421,8 +3420,6 @@ void ObjectMgr::LoadItemTemplates()
|
||||
for (auto& specs : itemTemplate.Specializations)
|
||||
if (specs.count() == 0)
|
||||
specs.set();
|
||||
|
||||
++sparseCount;
|
||||
}
|
||||
|
||||
// Load item effects (spells)
|
||||
@@ -10680,7 +10677,6 @@ void ObjectMgr::LoadRaceAndClassExpansionRequirements()
|
||||
|
||||
if (result)
|
||||
{
|
||||
uint32 count = 0;
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
@@ -10711,8 +10707,6 @@ void ObjectMgr::LoadRaceAndClassExpansionRequirements()
|
||||
RaceUnlockRequirement& raceUnlockRequirement = _raceUnlockRequirementStore[raceID];
|
||||
raceUnlockRequirement.Expansion = expansion;
|
||||
raceUnlockRequirement.AchievementId = achievementId;
|
||||
|
||||
++count;
|
||||
}
|
||||
while (result->NextRow());
|
||||
TC_LOG_INFO("server.loading", ">> Loaded {} race expansion requirements in {} ms.", _raceUnlockRequirementStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
@@ -66,11 +66,6 @@ void WorldSession::HandleVoidStorageQuery(WorldPackets::VoidStorage::QueryVoidSt
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 count = 0;
|
||||
for (uint8 i = 0; i < VOID_STORAGE_MAX_SLOT; ++i)
|
||||
if (_player->GetVoidStorageItem(i))
|
||||
++count;
|
||||
|
||||
WorldPackets::VoidStorage::VoidStorageContents voidStorageContents;
|
||||
voidStorageContents.Items.reserve(VOID_STORAGE_MAX_SLOT);
|
||||
|
||||
|
||||
@@ -2059,7 +2059,6 @@ void Spell::EffectDispel()
|
||||
size_t remaining = dispelList.size();
|
||||
|
||||
// Ok if exist some buffs for dispel try dispel it
|
||||
uint32 failCount = 0;
|
||||
DispelChargesList successList;
|
||||
successList.reserve(damage);
|
||||
|
||||
@@ -2102,7 +2101,6 @@ void Spell::EffectDispel()
|
||||
}
|
||||
else
|
||||
{
|
||||
++failCount;
|
||||
dispelFailed.FailedSpells.push_back(int32(itr->GetAura()->GetId()));
|
||||
}
|
||||
++count;
|
||||
@@ -4567,7 +4565,6 @@ void Spell::EffectStealBeneficialBuff()
|
||||
size_t remaining = stealList.size();
|
||||
|
||||
// Ok if exist some buffs for dispel try dispel it
|
||||
uint32 failCount = 0;
|
||||
std::vector<std::tuple<uint32, ObjectGuid, int32>> successList;
|
||||
successList.reserve(damage);
|
||||
|
||||
@@ -4598,7 +4595,6 @@ void Spell::EffectStealBeneficialBuff()
|
||||
}
|
||||
else
|
||||
{
|
||||
++failCount;
|
||||
dispelFailed.FailedSpells.push_back(int32(itr->GetAura()->GetId()));
|
||||
}
|
||||
++count;
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
bool footer = false;
|
||||
|
||||
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||
for (auto const [playerGuid, player] : ObjectAccessor::GetPlayers())
|
||||
for (auto&& [playerGuid, player] : ObjectAccessor::GetPlayers())
|
||||
{
|
||||
AccountTypes playerSec = player->GetSession()->GetSecurity();
|
||||
if ((player->IsGameMaster() ||
|
||||
|
||||
@@ -879,7 +879,7 @@ public:
|
||||
Player* groupMember = nullptr;
|
||||
|
||||
uint8 GroupMemberCount = 0;
|
||||
uint8 DeadMemberCount = 0;
|
||||
//uint8 DeadMemberCount = 0;
|
||||
uint8 FailedMemberCount = 0;
|
||||
|
||||
Group::MemberSlotList const& members = EventGroup->GetMemberSlots();
|
||||
@@ -896,8 +896,8 @@ public:
|
||||
}
|
||||
++GroupMemberCount;
|
||||
|
||||
if (groupMember->isDead())
|
||||
++DeadMemberCount;
|
||||
//if (groupMember->isDead())
|
||||
// ++DeadMemberCount;
|
||||
}
|
||||
|
||||
if (GroupMemberCount == FailedMemberCount || !player->IsWithinDistInMap(me, EVENT_AREA_RADIUS))
|
||||
|
||||
@@ -65,7 +65,6 @@ char* DB2DatabaseLoader::Load(bool custom, uint32& records, char**& indexTable,
|
||||
if (stringFields)
|
||||
stringPool.reserve(std::max<uint64>(stringPool.capacity(), stringPool.size() + stringFields * result->GetRowCount() + 1));
|
||||
|
||||
uint32 rec = 0;
|
||||
uint32 newRecords = 0;
|
||||
|
||||
do
|
||||
@@ -156,7 +155,6 @@ char* DB2DatabaseLoader::Load(bool custom, uint32& records, char**& indexTable,
|
||||
}
|
||||
|
||||
ASSERT(offset == recordSize);
|
||||
++rec;
|
||||
} while (result->NextRow());
|
||||
|
||||
if (!newRecords)
|
||||
|
||||
Reference in New Issue
Block a user