ams: revamp assertion system

This commit is contained in:
Michael Scire
2020-02-22 23:05:14 -08:00
parent 9572fb2ce3
commit 40400aee1f
168 changed files with 1014 additions and 696 deletions

View File

@@ -87,7 +87,7 @@ namespace ams::sf::cmif {
inline DomainObjectId GetId(Entry *e) {
const size_t index = e - this->entries;
AMS_ASSERT(index < this->num_entries);
AMS_ABORT_UNLESS(index < this->num_entries);
return DomainObjectId{ u32(index + 1) };
}

View File

@@ -41,8 +41,8 @@ namespace ams::sf::cmif {
ServerMessageRuntimeMetadata impl_metadata;
public:
DomainServiceObjectProcessor(ServerDomainBase *d, DomainObjectId *in_obj_ids, size_t num_in_objs) : domain(d), in_object_ids(in_obj_ids), num_in_objects(num_in_objs) {
AMS_ASSERT(this->domain != nullptr);
AMS_ASSERT(this->in_object_ids != nullptr);
AMS_ABORT_UNLESS(this->domain != nullptr);
AMS_ABORT_UNLESS(this->in_object_ids != nullptr);
this->impl_processor = nullptr;
this->out_object_ids = nullptr;
this->impl_metadata = {};