[Cleanup] Cleanup uses of insert/push_back when a temp object is used. (#3170)

This commit is contained in:
Aeadoin
2023-04-03 16:45:01 -04:00
committed by GitHub
parent 2bb15271c5
commit f752b57a55
42 changed files with 104 additions and 104 deletions
+6 -6
View File
@@ -483,7 +483,7 @@ void QuestManager::settimer(const char* timer_name, int seconds, Mob* mob) {
++cur;
}
QTimerList.push_back(QuestTimer(seconds * 1000, owner, timer_name));
QTimerList.emplace_back(QuestTimer(seconds * 1000, owner, timer_name));
}
void QuestManager::settimerMS(const char* timer_name, int milliseconds) {
@@ -507,7 +507,7 @@ void QuestManager::settimerMS(const char* timer_name, int milliseconds) {
++cur;
}
QTimerList.push_back(QuestTimer(milliseconds, owner, timer_name));
QTimerList.emplace_back(QuestTimer(milliseconds, owner, timer_name));
}
void QuestManager::settimerMS(const char* timer_name, int milliseconds, EQ::ItemInstance *inst) {
@@ -530,7 +530,7 @@ void QuestManager::settimerMS(const char* timer_name, int milliseconds, Mob *mob
++cur;
}
QTimerList.push_back(QuestTimer(milliseconds, mob, timer_name));
QTimerList.emplace_back(QuestTimer(milliseconds, mob, timer_name));
}
void QuestManager::stoptimer(const char* timer_name) {
@@ -685,7 +685,7 @@ void QuestManager::resumetimer(const char* timer_name, Mob* mob) {
++cur;
}
QTimerList.push_back(QuestTimer(milliseconds, m, timer_name));
QTimerList.emplace_back(QuestTimer(milliseconds, m, timer_name));
LogQuests("Creating a new timer and resuming [{}] for [{}] with [{}] ms remaining", timer_name, owner->GetName(), milliseconds);
}
@@ -1466,10 +1466,10 @@ void QuestManager::itemlink(int item_id) {
void QuestManager::signalwith(int npc_id, int signal_id, int wait_ms) {
if(wait_ms > 0) {
STimerList.push_back(SignalTimer(wait_ms, npc_id, signal_id));
STimerList.emplace_back(SignalTimer(wait_ms, npc_id, signal_id));
return;
} else {
STimerList.push_back(SignalTimer(0, npc_id, signal_id));
STimerList.emplace_back(SignalTimer(0, npc_id, signal_id));
return;
}
}