In-progress work: refactoring PAL not to be instanced.

This removes a lot of useless passing around of the PAL object.
This commit is contained in:
Ben Vanik
2013-03-29 05:07:32 -07:00
parent c46093266e
commit 85bdbd24d1
45 changed files with 444 additions and 189 deletions

View File

@@ -18,8 +18,7 @@ using namespace xe::kernel;
using namespace xe::kernel::fs;
FileSystem::FileSystem(xe_pal_ref pal) {
pal_ = xe_pal_retain(pal);
FileSystem::FileSystem() {
}
FileSystem::~FileSystem() {
@@ -31,8 +30,6 @@ FileSystem::~FileSystem() {
}
devices_.clear();
symlinks_.clear();
xe_pal_release(pal_);
}
int FileSystem::RegisterDevice(const char* path, Device* device) {
@@ -42,13 +39,13 @@ int FileSystem::RegisterDevice(const char* path, Device* device) {
int FileSystem::RegisterLocalDirectoryDevice(
const char* path, const xechar_t* local_path) {
Device* device = new LocalDirectoryDevice(pal_, path, local_path);
Device* device = new LocalDirectoryDevice(path, local_path);
return RegisterDevice(path, device);
}
int FileSystem::RegisterDiscImageDevice(
const char* path, const xechar_t* local_path) {
DiscImageDevice* device = new DiscImageDevice(pal_, path, local_path);
DiscImageDevice* device = new DiscImageDevice(path, local_path);
if (device->Init()) {
return 1;
}