Replace most returns with CHECK_ASSERTION

Also fix some Seek methods return types being unsigned, while returning
negative errors.

Added the CHECK_ASSERTION macro checks in a couple more places.

Simplified CHECK_ASSERTION macro usage.
This commit is contained in:
Raul Tambre 2015-11-08 13:42:41 +02:00
parent 9c2f48cd1d
commit 5d5a4f804b
14 changed files with 159 additions and 394 deletions

View file

@ -263,11 +263,7 @@ void MainFrame::InstallPkg(wxCommandEvent& WXUNUSED(event))
// Fetch title ID from the header
char title_id[10] = "?????????";
if (!pkg_f.seek(55))
{
LOG_ERROR(LOADER, "PKG: Failed to seek offset 55.");
return;
}
CHECK_ASSERTION(pkg_f.seek(55) != -1);
pkg_f.read(title_id, 9);
pkg_f.seek(0);