mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 16:53:48 -04:00
ams: use R_SUCCEED, R_THROW globally
This commit is contained in:
parent
e5b1739f65
commit
dd78ede99f
370 changed files with 2107 additions and 2107 deletions
|
@ -39,7 +39,7 @@ namespace ams::capsrv::server {
|
|||
|
||||
/* We're initialized. */
|
||||
g_initialized = true;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void FinalizeForDecoderServer() {
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace ams::capsrv::server {
|
|||
/* Initialize the idle event, we're idle initially. */
|
||||
os::InitializeEvent(std::addressof(m_idle_event), true, os::EventClearMode_ManualClear);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void DecoderControlServerManager::Finalize() {
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace ams::capsrv::server {
|
|||
|
||||
/* We succeeded, so we shouldn't clear the output memory. */
|
||||
clear_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,9 +49,9 @@ namespace ams::capsrv::server::jpeg {
|
|||
case JpegLibraryType::J_MESSAGE_CODE::JERR_TFILE_READ:
|
||||
case JpegLibraryType::J_MESSAGE_CODE::JERR_TFILE_SEEK:
|
||||
case JpegLibraryType::J_MESSAGE_CODE::JERR_TFILE_WRITE:
|
||||
return capsrv::ResultInternalJpegWorkMemoryShortage();
|
||||
R_THROW(capsrv::ResultInternalJpegWorkMemoryShortage());
|
||||
default:
|
||||
return capsrv::ResultInternalJpegEncoderError();
|
||||
R_THROW(capsrv::ResultInternalJpegEncoderError());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace ams::capsrv::server::jpeg {
|
|||
/* Return the output to the caller. */
|
||||
*out_size = rgb_size;
|
||||
*out_stride = rgb_stride;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -172,14 +172,14 @@ namespace ams::capsrv::server::jpeg {
|
|||
R_UNLESS(jpeg_finish_decompress(std::addressof(cinfo)) == TRUE, capsrv::ResultAlbumInvalidFileData());
|
||||
} else {
|
||||
/* Some unknown error was caught by our handler. */
|
||||
return capsrv::ResultAlbumInvalidFileData();
|
||||
R_THROW(capsrv::ResultAlbumInvalidFileData());
|
||||
}
|
||||
|
||||
/* Write the size we decoded to output. */
|
||||
*output.out_width = static_cast<s32>(cinfo.output_width);
|
||||
*output.out_width = static_cast<s32>(cinfo.output_height);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue