Cleaned up some StrongRef-related code.

This commit is contained in:
Alex Szpakowski
2016-03-01 18:57:17 -04:00
parent 8d7481c3b2
commit f51bbb8462
13 changed files with 52 additions and 53 deletions
+2 -3
View File
@@ -223,17 +223,16 @@ int w_newFileData(lua_State *L)
{
File *file = luax_checkfile(L, 1);
FileData *data = 0;
StrongRef<FileData> data;
try
{
data = file->read();
data.set(file->read(), Acquire::NORETAIN);
}
catch (love::Exception &e)
{
return luax_ioError(L, "%s", e.what());
}
luax_pushtype(L, FILESYSTEM_FILE_DATA_ID, data);
data->release();
return 1;
}
else