ams: revamp assertion system
This commit is contained in:
@@ -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) };
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user