Warning fixes, general cleanup (#5053)
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled

This commit is contained in:
brainiac
2026-04-04 23:27:21 -07:00
committed by GitHub
parent 435224631f
commit 491b1edd12
107 changed files with 1279 additions and 1542 deletions
+9 -8
View File
@@ -135,10 +135,11 @@ void PetitionList::AddPetition(Petition* pet) {
}
//Return Values: 0 = Ok ; -1 = Error deleting petition.
int PetitionList::DeletePetition(uint32 petnumber) {
int PetitionList::DeletePetition(uint32 petnumber)
{
LinkedListIterator<Petition*> iterator(list);
iterator.Reset();
LockMutex lock(&PList_Mutex);
std::scoped_lock lock(PList_Mutex);
while(iterator.MoreElements()) {
if (iterator.GetData()->GetID() == petnumber) {
database.DeletePetitionFromDB(iterator.GetData());
@@ -179,18 +180,18 @@ void PetitionList::ClearPetitions() {
return;
}
void PetitionList::ReadDatabase() {
LockMutex lock(&PList_Mutex);
void PetitionList::ReadDatabase()
{
std::scoped_lock lock(PList_Mutex);
ClearPetitions();
database.RefreshPetitionsFromDB();
UpdateGMQueue();
return;
}
void PetitionList::UpdatePetition(Petition* pet) {
LockMutex lock(&PList_Mutex);
void PetitionList::UpdatePetition(Petition* pet)
{
std::scoped_lock lock(PList_Mutex);
database.UpdatePetitionToDB(pet);
return;
}
void ZoneDatabase::DeletePetitionFromDB(Petition* wpet) {