Revert "Codechange: Explicitly move a few variables to avoid a copy constructor (fixes warning from clang)"

This reverts commit 6378a78817.

Fixes: #521
This commit is contained in:
Jonathan G Rennison
2023-05-22 20:02:17 +01:00
parent e9b376d484
commit a99418cb69
2 changed files with 3 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ public:
break; break;
} }
Lex(); Lex();
return std::move(ret); return ret;
} }
bool IsEndOfStatement() { return ((_lex._prevtoken == '\n') || (_token == SQUIRREL_EOB) || (_token == '}') || (_token == ';')); } bool IsEndOfStatement() { return ((_lex._prevtoken == '\n') || (_token == SQUIRREL_EOB) || (_token == '}') || (_token == ';')); }
void OptionalSemicolon() void OptionalSemicolon()

View File

@@ -503,14 +503,14 @@ SQObject SQFuncState::CreateString(const SQChar *s,SQInteger len)
{ {
SQObjectPtr ns(SQString::Create(_sharedstate,s,len)); SQObjectPtr ns(SQString::Create(_sharedstate,s,len));
_table(_strings)->NewSlot(ns,(SQInteger)1); _table(_strings)->NewSlot(ns,(SQInteger)1);
return std::move(ns); return ns;
} }
SQObject SQFuncState::CreateTable() SQObject SQFuncState::CreateTable()
{ {
SQObjectPtr nt(SQTable::Create(_sharedstate,0)); SQObjectPtr nt(SQTable::Create(_sharedstate,0));
_table(_strings)->NewSlot(nt,(SQInteger)1); _table(_strings)->NewSlot(nt,(SQInteger)1);
return std::move(nt); return nt;
} }
SQFunctionProto *SQFuncState::BuildProto() SQFunctionProto *SQFuncState::BuildProto()