stratosphere: In-class initialize members
Same thing, less code, less boilerplate.
This commit is contained in:
@@ -27,12 +27,11 @@ class MapUtils {
|
||||
|
||||
class AutoCloseMap {
|
||||
private:
|
||||
void *mapped_address;
|
||||
u64 base_address;
|
||||
u64 size;
|
||||
Handle process_handle;
|
||||
void *mapped_address = nullptr;
|
||||
u64 base_address = 0;
|
||||
u64 size = 0;
|
||||
Handle process_handle = 0;
|
||||
public:
|
||||
AutoCloseMap() : mapped_address(0), base_address(0), size(0), process_handle(0) { };
|
||||
~AutoCloseMap() {
|
||||
Close();
|
||||
}
|
||||
@@ -154,4 +153,4 @@ struct MappedCodeMemory {
|
||||
}
|
||||
*this = (const MappedCodeMemory){0};
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,11 +13,10 @@ enum RoServiceCmd {
|
||||
};
|
||||
|
||||
class RelocatableObjectsService final : public IServiceObject {
|
||||
Handle process_handle;
|
||||
u64 process_id;
|
||||
bool has_initialized;
|
||||
Handle process_handle = 0;
|
||||
u64 process_id = U64_MAX;
|
||||
bool has_initialized = false;
|
||||
public:
|
||||
RelocatableObjectsService() : process_handle(0), process_id(U64_MAX), has_initialized(false) { }
|
||||
~RelocatableObjectsService() {
|
||||
Registration::CloseRoService(this, this->process_handle);
|
||||
if (this->has_initialized) {
|
||||
|
||||
Reference in New Issue
Block a user