mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Cleanup] Cleanup uses of insert/push_back when a temp object is used. (#3170)
This commit is contained in:
+6
-6
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user