Working on switching to std::string.
This commit is contained in:
@@ -14,28 +14,17 @@ using namespace xe;
|
||||
using namespace xe::kernel;
|
||||
using namespace xe::kernel::fs;
|
||||
|
||||
MemoryMapping::MemoryMapping(uint8_t* address, size_t length)
|
||||
: address_(address), length_(length) {}
|
||||
|
||||
MemoryMapping::MemoryMapping(uint8_t* address, size_t length) :
|
||||
address_(address), length_(length) {
|
||||
}
|
||||
MemoryMapping::~MemoryMapping() {}
|
||||
|
||||
MemoryMapping::~MemoryMapping() {
|
||||
}
|
||||
|
||||
|
||||
Entry::Entry(Type type, Device* device, const char* path) :
|
||||
type_(type),
|
||||
device_(device) {
|
||||
Entry::Entry(Type type, Device* device, const std::string& path)
|
||||
: type_(type), device_(device), path_(path) {
|
||||
assert_not_null(device);
|
||||
path_ = xestrdupa(path);
|
||||
// TODO(benvanik): *shudder*
|
||||
absolute_path_ = xestrdupa((std::string(device->path()) + std::string(path)).c_str());
|
||||
absolute_path_ = device->path() + path;
|
||||
// TODO(benvanik): last index of \, unless \ at end, then before that
|
||||
name_ = NULL;
|
||||
name_ = "";
|
||||
}
|
||||
|
||||
Entry::~Entry() {
|
||||
xe_free(name_);
|
||||
xe_free(path_);
|
||||
xe_free(absolute_path_);
|
||||
}
|
||||
Entry::~Entry() = default;
|
||||
|
||||
Reference in New Issue
Block a user