aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/extra/m_mysql.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-03-30 19:44:07 +0100
committerGravatar Sadie Powell2021-03-30 19:44:07 +0100
commit49339528112c57de5e52f2e8bbea91bf37c3704a (patch)
tree6e8088af58b4df52958e8a691a6d36386d09df66 /src/modules/extra/m_mysql.cpp
parentFix the setter and set time of list modes being lost on netburst. (diff)
Use emplace_back where possible.
Diffstat (limited to 'src/modules/extra/m_mysql.cpp')
-rw-r--r--src/modules/extra/m_mysql.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index bbd2d7f89..fb74245b8 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -196,9 +196,9 @@ class MySQLresult : public SQL::Result
{
std::string a = (fields[field_count].name ? fields[field_count].name : "");
if (row[field_count])
- fieldlists[n].push_back(SQL::Field(row[field_count]));
+ fieldlists[n].emplace_back(row[field_count]);
else
- fieldlists[n].push_back(SQL::Field());
+ fieldlists[n].emplace_back();
colnames.push_back(a);
field_count++;
}
@@ -390,7 +390,7 @@ class SQLConnection : public SQL::Provider
{
ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Executing MySQL query: " + qs);
Parent()->Dispatcher->LockQueue();
- Parent()->qq.push_back(QueryQueueItem(q, qs, this));
+ Parent()->qq.emplace_back(q, qs, this);
Parent()->Dispatcher->UnlockQueueWakeup();
}
@@ -563,7 +563,7 @@ void DispatcherThread::OnStart()
if (!Parent->qq.empty() && Parent->qq.front().query == i.query)
{
Parent->qq.pop_front();
- Parent->rq.push_back(ResultQueueItem(i.query, res));
+ Parent->rq.emplace_back(i.query, res);
NotifyParent();
}
else