Replace more Move/Forward with STL variants.
This commit is contained in:
@@ -400,13 +400,13 @@ SMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key
|
||||
}
|
||||
} else if (m_ParseState == PSTATE_GAMEDEFS_KEYS) {
|
||||
ke::AString vstr(value);
|
||||
m_Keys.replace(key, ke::Move(vstr));
|
||||
m_Keys.replace(key, std::move(vstr));
|
||||
}
|
||||
else if (m_ParseState == PSTATE_GAMEDEFS_KEYS_PLATFORM) {
|
||||
if (IsPlatformCompatible(key, &matched_platform))
|
||||
{
|
||||
ke::AString vstr(value);
|
||||
m_Keys.replace(m_Key, ke::Move(vstr));
|
||||
m_Keys.replace(m_Key, std::move(vstr));
|
||||
}
|
||||
} else if (m_ParseState == PSTATE_GAMEDEFS_SUPPORTED) {
|
||||
if (strcmp(key, "game") == 0)
|
||||
|
||||
@@ -1211,7 +1211,7 @@ void CPluginManager::LoadExtensions(CPlugin *pPlugin)
|
||||
}
|
||||
return true;
|
||||
};
|
||||
pPlugin->ForEachExtVar(ke::Move(callback));
|
||||
pPlugin->ForEachExtVar(std::move(callback));
|
||||
}
|
||||
|
||||
bool CPluginManager::RequireExtensions(CPlugin *pPlugin)
|
||||
@@ -1247,7 +1247,7 @@ bool CPluginManager::RequireExtensions(CPlugin *pPlugin)
|
||||
return true;
|
||||
};
|
||||
|
||||
return pPlugin->ForEachExtVar(ke::Move(callback));
|
||||
return pPlugin->ForEachExtVar(std::move(callback));
|
||||
}
|
||||
|
||||
CPlugin *CPluginManager::CompileAndPrep(const char *path)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
// or <http://www.sourcemod.net/license.php>.
|
||||
#include "frame_tasks.h"
|
||||
#include <am-vector.h>
|
||||
#include <utility>
|
||||
|
||||
using namespace SourceMod;
|
||||
|
||||
@@ -35,7 +36,7 @@ ke::Vector<ke::Function<void()>> sWorkTasks;
|
||||
void
|
||||
SourceMod::ScheduleTaskForNextFrame(ke::Function<void()>&& task)
|
||||
{
|
||||
sNextTasks.append(ke::Forward<decltype(task)>(task));
|
||||
sNextTasks.append(std::forward<decltype(task)>(task));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -45,9 +46,9 @@ SourceMod::RunScheduledFrameTasks(bool simulating)
|
||||
return;
|
||||
|
||||
// Swap.
|
||||
ke::Vector<ke::Function<void()>> temp(ke::Move(sNextTasks));
|
||||
sNextTasks = ke::Move(sWorkTasks);
|
||||
sWorkTasks = ke::Move(temp);
|
||||
ke::Vector<ke::Function<void()>> temp(std::move(sNextTasks));
|
||||
sNextTasks = std::move(sWorkTasks);
|
||||
sWorkTasks = std::move(temp);
|
||||
|
||||
for (size_t i = 0; i < sWorkTasks.length(); i++)
|
||||
sWorkTasks[i]();
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <memory>
|
||||
|
||||
#include "common_logic.h"
|
||||
#include <am-moveable.h>
|
||||
#include <am-refcounting.h>
|
||||
#include <sm_stringhashmap.h>
|
||||
#include "sm_memtable.h"
|
||||
|
||||
@@ -1540,7 +1540,7 @@ static cell_t SQL_AddQuery(IPluginContext *pContext, const cell_t *params)
|
||||
Transaction::Entry entry;
|
||||
entry.query = query;
|
||||
entry.data = params[3];
|
||||
txn->entries.append(ke::Move(entry));
|
||||
txn->entries.append(std::move(entry));
|
||||
|
||||
return cell_t(txn->entries.length() - 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user