stratosphere: In-class initialize members

Same thing, less code, less boilerplate.
This commit is contained in:
Léo Lam authored and SciresM committed 2018-07-10 09:38:18 -07:00
1 parent 5b3e8e1c5d
commit e088a2f414
8 files changed
+42 -54

No files matched your search

+5 -6
View File
@@ -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) {