Cleaning up asserts and file/line macros.
This commit is contained in:
@@ -98,11 +98,11 @@ Entry* DiscImageDevice::ResolvePath(const char* path) {
|
||||
}
|
||||
|
||||
X_STATUS DiscImageDevice::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
||||
XEASSERTALWAYS();
|
||||
assert_always();
|
||||
return X_STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
X_STATUS DiscImageDevice::QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info, size_t length) {
|
||||
XEASSERTALWAYS();
|
||||
assert_always();
|
||||
return X_STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ DiscImageEntry::~DiscImageEntry() {
|
||||
}
|
||||
|
||||
X_STATUS DiscImageEntry::QueryInfo(XFileInfo* out_info) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
out_info->creation_time = 0;
|
||||
out_info->last_access_time = 0;
|
||||
out_info->last_write_time = 0;
|
||||
@@ -66,7 +66,7 @@ X_STATUS DiscImageEntry::QueryInfo(XFileInfo* out_info) {
|
||||
|
||||
X_STATUS DiscImageEntry::QueryDirectory(
|
||||
XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
|
||||
if (restart == true && gdfx_entry_iterator_ != gdfx_entry_->children.end()) {
|
||||
gdfx_entry_iterator_ = gdfx_entry_->children.end();
|
||||
|
||||
@@ -67,7 +67,7 @@ Entry* HostPathDevice::ResolvePath(const char* path) {
|
||||
|
||||
// TODO(gibbed): call into HostPathDevice?
|
||||
X_STATUS HostPathDevice::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
const char* name = "test"; // TODO(gibbed): actual value
|
||||
|
||||
auto end = (uint8_t*)out_info + length;
|
||||
@@ -86,7 +86,7 @@ X_STATUS HostPathDevice::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
||||
|
||||
// TODO(gibbed): call into HostPathDevice?
|
||||
X_STATUS HostPathDevice::QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info, size_t length) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
const char* name = "test"; // TODO(gibbed): actual value
|
||||
|
||||
auto end = (uint8_t*)out_info + length;
|
||||
|
||||
@@ -54,7 +54,7 @@ HostPathEntry::~HostPathEntry() {
|
||||
#define COMBINE_TIME(t) (((uint64_t)t.dwHighDateTime << 32) | t.dwLowDateTime)
|
||||
|
||||
X_STATUS HostPathEntry::QueryInfo(XFileInfo* out_info) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
if (!GetFileAttributesEx(
|
||||
@@ -75,7 +75,7 @@ X_STATUS HostPathEntry::QueryInfo(XFileInfo* out_info) {
|
||||
|
||||
X_STATUS HostPathEntry::QueryDirectory(
|
||||
XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
|
||||
WIN32_FIND_DATA ffd;
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@ Entry* STFSContainerDevice::ResolvePath(const char* path) {
|
||||
|
||||
|
||||
X_STATUS STFSContainerDevice::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
||||
XEASSERTALWAYS();
|
||||
assert_always();
|
||||
return X_STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
X_STATUS STFSContainerDevice::QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info, size_t length) {
|
||||
XEASSERTALWAYS();
|
||||
assert_always();
|
||||
return X_STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ STFSContainerEntry::~STFSContainerEntry() {
|
||||
}
|
||||
|
||||
X_STATUS STFSContainerEntry::QueryInfo(XFileInfo* out_info) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
out_info->creation_time = stfs_entry_->update_timestamp;
|
||||
out_info->last_access_time = stfs_entry_->access_timestamp;
|
||||
out_info->last_write_time = stfs_entry_->update_timestamp;
|
||||
@@ -45,7 +45,7 @@ X_STATUS STFSContainerEntry::QueryInfo(XFileInfo* out_info) {
|
||||
|
||||
X_STATUS STFSContainerEntry::QueryDirectory(
|
||||
XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) {
|
||||
XEASSERTNOTNULL(out_info);
|
||||
assert_not_null(out_info);
|
||||
|
||||
if (restart && stfs_entry_iterator_ != stfs_entry_->children.end()) {
|
||||
stfs_entry_iterator_ = stfs_entry_->children.end();
|
||||
|
||||
@@ -26,7 +26,7 @@ MemoryMapping::~MemoryMapping() {
|
||||
Entry::Entry(Type type, Device* device, const char* path) :
|
||||
type_(type),
|
||||
device_(device) {
|
||||
XEASSERTNOTNULL(device);
|
||||
assert_not_null(device);
|
||||
path_ = xestrdupa(path);
|
||||
// TODO(benvanik): *shudder*
|
||||
absolute_path_ = xestrdupa((std::string(device->path()) + std::string(path)).c_str());
|
||||
|
||||
Reference in New Issue
Block a user