sts: add STS_UNREACHABLE_DEFAULT_CASE()

This commit is contained in:
Michael Scire authored and SciresM committed 2019-12-07 12:41:28 -08:00
1 parent 609a302e16
commit add18d868f
23 files changed
+50 -87

No files matched your search

@@ -116,8 +116,7 @@ namespace sts::os {
case SystemEventState::InterProcessEvent:
this->GetInterProcessEvent().~InterProcessEvent();
break;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
this->state = SystemEventState::Uninitialized;
}
@@ -131,8 +130,7 @@ namespace sts::os {
this->GetInterProcessEvent().Signal();
break;
case SystemEventState::Uninitialized:
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}
@@ -145,8 +143,7 @@ namespace sts::os {
this->GetInterProcessEvent().Reset();
break;
case SystemEventState::Uninitialized:
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}
void SystemEvent::Wait() {
@@ -158,8 +155,7 @@ namespace sts::os {
this->GetInterProcessEvent().Wait();
break;
case SystemEventState::Uninitialized:
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}
@@ -170,8 +166,7 @@ namespace sts::os {
case SystemEventState::InterProcessEvent:
return this->GetInterProcessEvent().TryWait();
case SystemEventState::Uninitialized:
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}
@@ -182,8 +177,7 @@ namespace sts::os {
case SystemEventState::InterProcessEvent:
return this->GetInterProcessEvent().TimedWait(ns);
case SystemEventState::Uninitialized:
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
}
}
@@ -48,8 +48,7 @@ namespace sts::os {
new (GetPointer(this->impl_storage)) impl::WaitableHolderOfInterProcessEvent(&event->GetInterProcessEvent());
break;
case SystemEventState::Uninitialized:
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
/* Set user-data. */
@@ -81,8 +80,7 @@ namespace sts::os {
case MessageQueueWaitKind::ForNotEmpty:
new (GetPointer(this->impl_storage)) impl::WaitableHolderOfMessageQueueForNotEmpty(message_queue);
break;
default:
std::abort();
STS_UNREACHABLE_DEFAULT_CASE();
}
/* Set user-data. */