Fix clang builds

see #955
master
krzys-h 2017-05-24 13:58:57 +02:00
parent 6c8ec46725
commit 28081bfd3e
2 changed files with 4 additions and 5 deletions

View File

@ -223,7 +223,6 @@ bool CBotDefParam::HasDefault()
////////////////////////////////////////////////////////////////////////////////
void CBotDefParam::RestoreState(CBotStack* &pj, bool bMain)
{
assert(this != nullptr);
CBotDefParam* p = this;
CBotStack* pile = nullptr;

View File

@ -216,15 +216,15 @@ protected:
if (error != CBotNoErr)
{
ADD_FAILURE() << "Compile error - " << error << " (" << cursor1 << "-" << (cursor2 >= 0 ? cursor2 : cursor1) << ")" << std::endl << GetFormattedLineInfo(code, cursor1); // TODO: Error messages are on Colobot side
return std::move(program);
return program;
}
else
{
ADD_FAILURE() << "No compile error, expected " << expectedCompileError; // TODO: Error messages are on Colobot side
return std::move(program);
return program;
}
}
if (expectedCompileError != CBotNoErr) return std::move(program);
if (expectedCompileError != CBotNoErr) return program;
for (const std::string& test : tests)
{
@ -285,7 +285,7 @@ protected:
ADD_FAILURE() << ss.str();
}
}
return std::move(program); // Take it if you want, destroy on exit otherwise
return program; // Take it if you want, destroy on exit otherwise
}
};