mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Explicitly move a few variables to avoid a copy constructor (fixes warning from clang)
parent
99f5e29484
commit
6378a78817
|
@ -142,7 +142,7 @@ public:
|
|||
break;
|
||||
}
|
||||
Lex();
|
||||
return ret;
|
||||
return std::move(ret);
|
||||
}
|
||||
bool IsEndOfStatement() { return ((_lex._prevtoken == '\n') || (_token == SQUIRREL_EOB) || (_token == '}') || (_token == ';')); }
|
||||
void OptionalSemicolon()
|
||||
|
|
|
@ -502,14 +502,14 @@ SQObject SQFuncState::CreateString(const SQChar *s,SQInteger len)
|
|||
{
|
||||
SQObjectPtr ns(SQString::Create(_sharedstate,s,len));
|
||||
_table(_strings)->NewSlot(ns,(SQInteger)1);
|
||||
return ns;
|
||||
return std::move(ns);
|
||||
}
|
||||
|
||||
SQObject SQFuncState::CreateTable()
|
||||
{
|
||||
SQObjectPtr nt(SQTable::Create(_sharedstate,0));
|
||||
_table(_strings)->NewSlot(nt,(SQInteger)1);
|
||||
return nt;
|
||||
return std::move(nt);
|
||||
}
|
||||
|
||||
SQFunctionProto *SQFuncState::BuildProto()
|
||||
|
|
Loading…
Reference in New Issue