Working on switching to std::string.

This commit is contained in:
Ben Vanik
2014-08-16 02:30:23 -07:00
parent 01f0b14250
commit a4dfc23abc
34 changed files with 211 additions and 250 deletions

View File

@@ -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;