mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
clang-tidy complained about std::moves
This commit is contained in:
parent
6237703140
commit
bab75a3a46
|
|
@ -1187,10 +1187,10 @@ ConsoleValue _internalExecute(S32 argc, ConsoleValue argv[])
|
|||
warnf(ConsoleLogEntry::Script, "%s: Unknown command.", funcName);
|
||||
|
||||
STR.clearFunctionOffset();
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
return std::move(ent->execute(argc, argv, NULL));
|
||||
return (ent->execute(argc, argv, NULL));
|
||||
}
|
||||
|
||||
ConsoleValue execute(S32 argc, ConsoleValue argv[])
|
||||
|
|
@ -1220,7 +1220,7 @@ ConsoleValue execute(S32 argc, const char *argv[])
|
|||
ConsoleStackFrameSaver stackSaver;
|
||||
stackSaver.save();
|
||||
StringArrayToConsoleValueWrapper args(argc, argv);
|
||||
return std::move(execute(args.count(), args));
|
||||
return (execute(args.count(), args));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -1229,12 +1229,12 @@ ConsoleValue execute(S32 argc, const char *argv[])
|
|||
static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue argv[], bool thisCallOnly)
|
||||
{
|
||||
if (object == NULL)
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
STR.clearFunctionOffset();
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
// [neo, 10/05/2007 - #3010]
|
||||
|
|
@ -1262,7 +1262,7 @@ static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue a
|
|||
{
|
||||
//warnf(ConsoleLogEntry::Script, "%s: undefined for object '%s' - id %d", funcName, object->getName(), object->getId());
|
||||
STR.clearFunctionOffset();
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
const char* oldIdent = dStrdup(argv[1].getString());
|
||||
|
|
@ -1270,7 +1270,7 @@ static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue a
|
|||
// Twiddle %this argument
|
||||
argv[1].setInt(ident);
|
||||
|
||||
ConsoleValue ret = std::move(ent->execute(argc, argv, object));
|
||||
ConsoleValue ret = (ent->execute(argc, argv, object));
|
||||
|
||||
// Twiddle it back
|
||||
argv[1].setString(oldIdent);
|
||||
|
|
@ -1281,7 +1281,7 @@ static ConsoleValue _internalExecute(SimObject *object, S32 argc, ConsoleValue a
|
|||
|
||||
warnf(ConsoleLogEntry::Script, "Con::execute - %d has no namespace: %s", object->getId(), funcName);
|
||||
STR.clearFunctionOffset();
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
ConsoleValue execute(SimObject *object, S32 argc, ConsoleValue argv[], bool thisCallOnly)
|
||||
|
|
@ -1289,7 +1289,7 @@ ConsoleValue execute(SimObject *object, S32 argc, ConsoleValue argv[], bool this
|
|||
if(argc < 2)
|
||||
{
|
||||
STR.clearFunctionOffset();
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
ConsoleStackFrameSaver stackSaver;
|
||||
|
|
@ -1299,7 +1299,7 @@ ConsoleValue execute(SimObject *object, S32 argc, ConsoleValue argv[], bool this
|
|||
{
|
||||
if (isMainThread())
|
||||
{
|
||||
return std::move(_internalExecute(object, argc, argv, thisCallOnly));
|
||||
return (_internalExecute(object, argc, argv, thisCallOnly));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1311,7 +1311,7 @@ ConsoleValue execute(SimObject *object, S32 argc, ConsoleValue argv[], bool this
|
|||
|
||||
warnf(ConsoleLogEntry::Script, "Con::execute - %d has no namespace: %s", object->getId(), argv[0].getString());
|
||||
STR.clearFunctionOffset();
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
ConsoleValue execute(SimObject *object, S32 argc, const char *argv[], bool thisCallOnly)
|
||||
|
|
@ -1319,7 +1319,7 @@ ConsoleValue execute(SimObject *object, S32 argc, const char *argv[], bool thisC
|
|||
ConsoleStackFrameSaver stackSaver;
|
||||
stackSaver.save();
|
||||
StringArrayToConsoleValueWrapper args(argc, argv);
|
||||
return std::move(execute(object, args.count(), args, thisCallOnly));
|
||||
return (execute(object, args.count(), args, thisCallOnly));
|
||||
}
|
||||
|
||||
inline ConsoleValue _executef(SimObject *obj, S32 checkArgc, S32 argc, ConsoleValue *argv)
|
||||
|
|
@ -1327,7 +1327,7 @@ inline ConsoleValue _executef(SimObject *obj, S32 checkArgc, S32 argc, ConsoleVa
|
|||
const U32 maxArg = 12;
|
||||
AssertFatal(checkArgc == argc, "Incorrect arg count passed to Con::executef(SimObject*)");
|
||||
AssertFatal(argc <= maxArg - 1, "Too many args passed to Con::_executef(SimObject*). Please update the function to handle more.");
|
||||
return std::move(execute(obj, argc, argv));
|
||||
return (execute(obj, argc, argv));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -1336,7 +1336,7 @@ inline ConsoleValue _executef(S32 checkArgc, S32 argc, ConsoleValue *argv)
|
|||
const U32 maxArg = 10;
|
||||
AssertFatal(checkArgc == argc, "Incorrect arg count passed to Con::executef()");
|
||||
AssertFatal(argc <= maxArg, "Too many args passed to Con::_executef(). Please update the function to handle more.");
|
||||
return std::move(execute(argc, argv));
|
||||
return (execute(argc, argv));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -2312,10 +2312,10 @@ ConsoleValue _BaseEngineConsoleCallbackHelper::_exec()
|
|||
|
||||
STR.clearFunctionOffset();
|
||||
mArgc = mInitialArgc; // reset
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
ConsoleValue returnValue = std::move(Con::_internalExecute( mArgc, mArgv ));
|
||||
ConsoleValue returnValue = (Con::_internalExecute( mArgc, mArgv ));
|
||||
mArgc = mInitialArgc; // reset args
|
||||
return returnValue;
|
||||
}
|
||||
|
|
@ -2324,7 +2324,7 @@ ConsoleValue _BaseEngineConsoleCallbackHelper::_execLater(SimConsoleThreadExecEv
|
|||
{
|
||||
mArgc = mInitialArgc; // reset args
|
||||
Sim::postEvent((SimObject*)Sim::getRootGroup(), evt, Sim::getCurrentTime());
|
||||
return std::move(evt->getCB().waitForResult());
|
||||
return (evt->getCB().waitForResult());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1163,7 +1163,7 @@ ConsoleValue Namespace::Entry::execute(S32 argc, ConsoleValue *argv, SimObject *
|
|||
}
|
||||
else
|
||||
{
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1181,7 +1181,7 @@ ConsoleValue Namespace::Entry::execute(S32 argc, ConsoleValue *argv, SimObject *
|
|||
{
|
||||
Con::warnf(ConsoleLogEntry::Script, "%s::%s - wrong number of arguments. got %d, expected %d to %d", mNamespace->mName, mFunctionName, argc, mMinArgs, mMaxArgs);
|
||||
Con::warnf(ConsoleLogEntry::Script, "usage: %s", mUsage);
|
||||
return std::move(ConsoleValue());
|
||||
return (ConsoleValue());
|
||||
}
|
||||
|
||||
ConsoleValue result;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Con
|
|||
EvalResult(ConsoleValue&& pValue)
|
||||
{
|
||||
valid = true;
|
||||
value = (ConsoleValue&&)pValue;
|
||||
value = std::move(pValue);
|
||||
}
|
||||
|
||||
EvalResult(String errorMessage)
|
||||
|
|
|
|||
|
|
@ -134,9 +134,9 @@ void SimConsoleThreadExecEvent::process(SimObject* object)
|
|||
if (cb)
|
||||
{
|
||||
if (mOnObject)
|
||||
cb->handleCallback(std::move(Con::execute(object, mArgc, mArgv)));
|
||||
cb->handleCallback(Con::execute(object, mArgc, mArgv));
|
||||
else
|
||||
cb->handleCallback(std::move(Con::execute(mArgc, mArgv)));
|
||||
cb->handleCallback(Con::execute(mArgc, mArgv));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -668,7 +668,7 @@ Con::EvalResult CodeBlock::compileExec(StringTableEntry fileName, const char *in
|
|||
Con::warnf(ConsoleLogEntry::General, "precompile size mismatch, precompile: %d compile: %d", codeSize, lastIp);
|
||||
|
||||
// repurpose argc as local register counter for global state
|
||||
return std::move(exec(0, fileName, NULL, localRegisterCount, 0, noCalls, NULL, setFrame));
|
||||
return (exec(0, fileName, NULL, localRegisterCount, 0, noCalls, NULL, setFrame));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ namespace TorqueScript
|
|||
fileName = StringTable->insert(fileName);
|
||||
|
||||
CodeBlock* newCodeBlock = new CodeBlock();
|
||||
return std::move(newCodeBlock->compileExec(fileName, string, false, fileName ? -1 : 0));
|
||||
return (newCodeBlock->compileExec(fileName, string, false, fileName ? -1 : 0));
|
||||
}
|
||||
|
||||
Con::EvalResult TorqueScriptRuntime::evaluate(const char* script, S32 frame, bool echo, const char* fileName)
|
||||
|
|
|
|||
Loading…
Reference in a new issue