common: Change semantics of UNREACHABLE to unconditionally crash
This commit is contained in:
parent
bd3bfe411d
commit
084d7d6b01
72 changed files with 182 additions and 173 deletions
|
@ -178,7 +178,7 @@ ResultCode Controller::GetStatus() const {
|
|||
}
|
||||
|
||||
void Controller::ExecuteInteractive() {
|
||||
UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet.");
|
||||
ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet.");
|
||||
}
|
||||
|
||||
void Controller::Execute() {
|
||||
|
|
|
@ -156,7 +156,7 @@ ResultCode Error::GetStatus() const {
|
|||
}
|
||||
|
||||
void Error::ExecuteInteractive() {
|
||||
UNREACHABLE_MSG("Unexpected interactive applet data!");
|
||||
ASSERT_MSG(false, "Unexpected interactive applet data!");
|
||||
}
|
||||
|
||||
void Error::Execute() {
|
||||
|
|
|
@ -76,7 +76,7 @@ ResultCode Auth::GetStatus() const {
|
|||
}
|
||||
|
||||
void Auth::ExecuteInteractive() {
|
||||
UNREACHABLE_MSG("Unexpected interactive applet data.");
|
||||
ASSERT_MSG(false, "Unexpected interactive applet data.");
|
||||
}
|
||||
|
||||
void Auth::Execute() {
|
||||
|
@ -175,7 +175,7 @@ ResultCode PhotoViewer::GetStatus() const {
|
|||
}
|
||||
|
||||
void PhotoViewer::ExecuteInteractive() {
|
||||
UNREACHABLE_MSG("Unexpected interactive applet data.");
|
||||
ASSERT_MSG(false, "Unexpected interactive applet data.");
|
||||
}
|
||||
|
||||
void PhotoViewer::Execute() {
|
||||
|
|
|
@ -67,7 +67,7 @@ ResultCode MiiEdit::GetStatus() const {
|
|||
}
|
||||
|
||||
void MiiEdit::ExecuteInteractive() {
|
||||
UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet.");
|
||||
ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet.");
|
||||
}
|
||||
|
||||
void MiiEdit::Execute() {
|
||||
|
|
|
@ -44,7 +44,7 @@ ResultCode ProfileSelect::GetStatus() const {
|
|||
}
|
||||
|
||||
void ProfileSelect::ExecuteInteractive() {
|
||||
UNREACHABLE_MSG("Attempted to call interactive execution on non-interactive applet.");
|
||||
ASSERT_MSG(false, "Attempted to call interactive execution on non-interactive applet.");
|
||||
}
|
||||
|
||||
void ProfileSelect::Execute() {
|
||||
|
|
|
@ -71,7 +71,7 @@ void SoftwareKeyboard::Initialize() {
|
|||
InitializeBackground(applet_mode);
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE_MSG("Invalid LibraryAppletMode={}", applet_mode);
|
||||
ASSERT_MSG(false, "Invalid LibraryAppletMode={}", applet_mode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ void WebBrowser::Initialize() {
|
|||
InitializeLobby();
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE_MSG("Invalid ShimKind={}", web_arg_header.shim_kind);
|
||||
ASSERT_MSG(false, "Invalid ShimKind={}", web_arg_header.shim_kind);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ void WebBrowser::Execute() {
|
|||
ExecuteLobby();
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE_MSG("Invalid ShimKind={}", web_arg_header.shim_kind);
|
||||
ASSERT_MSG(false, "Invalid ShimKind={}", web_arg_header.shim_kind);
|
||||
WebBrowserExit(WebExitReason::EndButtonPressed);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -899,7 +899,7 @@ void FSP_SRV::OpenSaveDataFileSystem(Kernel::HLERequestContext& ctx) {
|
|||
case FileSys::SaveDataSpaceId::TemporaryStorage:
|
||||
case FileSys::SaveDataSpaceId::ProperSystem:
|
||||
case FileSys::SaveDataSpaceId::SafeMode:
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
}
|
||||
|
||||
auto filesystem = std::make_shared<IFileSystem>(system, std::move(dir.Unwrap()),
|
||||
|
|
|
@ -160,7 +160,7 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
|||
shared_memory->system_properties.raw = 0;
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::None:
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
shared_memory->style_tag.fullkey.Assign(1);
|
||||
|
@ -422,7 +422,7 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing) {
|
|||
libnx_state.connection_status.is_connected.Assign(1);
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::None:
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::NES:
|
||||
|
@ -597,7 +597,7 @@ void Controller_NPad::OnMotionUpdate(const Core::Timing::CoreTiming& core_timing
|
|||
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::None:
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Pokeball:
|
||||
|
@ -856,7 +856,7 @@ void Controller_NPad::VibrateController(
|
|||
}
|
||||
|
||||
if (vibration_device_handle.device_index == Core::HID::DeviceIndex::None) {
|
||||
UNREACHABLE_MSG("DeviceIndex should never be None!");
|
||||
ASSERT_MSG(false, "DeviceIndex should never be None!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1441,7 +1441,7 @@ void Hid::GetVibrationDeviceInfo(Kernel::HLERequestContext& ctx) {
|
|||
break;
|
||||
case Core::HID::DeviceIndex::None:
|
||||
default:
|
||||
UNREACHABLE_MSG("DeviceIndex should never be None!");
|
||||
ASSERT_MSG(false, "DeviceIndex should never be None!");
|
||||
vibration_device_info.position = Core::HID::VibrationDevicePosition::None;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -347,7 +347,7 @@ public:
|
|||
}
|
||||
|
||||
if (!succeeded) {
|
||||
UNREACHABLE_MSG("Out of address space!");
|
||||
ASSERT_MSG(false, "Out of address space!");
|
||||
return Kernel::ResultOutOfMemory;
|
||||
}
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Commo
|
|||
u8 glasses_type{};
|
||||
while (glasses_type_start < glasses_type_info.values[glasses_type]) {
|
||||
if (++glasses_type >= glasses_type_info.values_count) {
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ u32 SyncpointManager::AllocateSyncpoint() {
|
|||
return syncpoint_id;
|
||||
}
|
||||
}
|
||||
UNREACHABLE_MSG("No more available syncpoints!");
|
||||
ASSERT_MSG(false, "No more available syncpoints!");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -659,7 +659,7 @@ Status BufferQueueProducer::Query(NativeWindow what, s32* out_value) {
|
|||
value = core->consumer_usage_bit;
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
return Status::BadValue;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,12 +48,12 @@ ResultCode StandardUserSystemClockCore::GetClockContext(Core::System& system,
|
|||
}
|
||||
|
||||
ResultCode StandardUserSystemClockCore::Flush(const SystemClockContext&) {
|
||||
UNREACHABLE();
|
||||
UNIMPLEMENTED();
|
||||
return ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
ResultCode StandardUserSystemClockCore::SetClockContext(const SystemClockContext&) {
|
||||
UNREACHABLE();
|
||||
UNIMPLEMENTED();
|
||||
return ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ struct TimeManager::Impl final {
|
|||
FileSys::VirtualFile& vfs_file) {
|
||||
if (time_zone_content_manager.GetTimeZoneManager().SetDeviceLocationNameWithTimeZoneRule(
|
||||
location_name, vfs_file) != ResultSuccess) {
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ struct TimeManager::Impl final {
|
|||
} else {
|
||||
if (standard_local_system_clock_core.SetCurrentTime(system_, posix_time) !=
|
||||
ResultSuccess) {
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ struct TimeManager::Impl final {
|
|||
|
||||
if (standard_network_system_clock_core.SetSystemClockContext(clock_context) !=
|
||||
ResultSuccess) {
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ struct TimeManager::Impl final {
|
|||
Clock::SteadyClockTimePoint steady_clock_time_point) {
|
||||
if (standard_user_system_clock_core.SetAutomaticCorrectionEnabled(
|
||||
system_, is_automatic_correction_enabled) != ResultSuccess) {
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ struct TimeManager::Impl final {
|
|||
if (GetStandardLocalSystemClockCore()
|
||||
.SetCurrentTime(system_, timespan.ToSeconds())
|
||||
.IsError()) {
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ static constexpr int TransitionTime(int year, Rule rule, int offset) {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
UNREACHABLE();
|
||||
ASSERT(false);
|
||||
}
|
||||
return value + rule.transition_time + offset;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue