mirror of
https://github.com/JesseTG/melonds-ds.git
synced 2024-11-24 06:59:40 +00:00
Remove dirent::name
This commit is contained in:
parent
d96a406bcf
commit
aaa75d255f
@ -21,6 +21,8 @@
|
||||
|
||||
#include <file/file_path.h>
|
||||
|
||||
#include "environment.hpp"
|
||||
|
||||
retro::dirent_tree retro::readdir(const std::string &path, bool hidden) noexcept {
|
||||
return dirent_tree(path, hidden);
|
||||
}
|
||||
@ -47,7 +49,6 @@ retro::dirent_tree::dirent_iterator::dirent_iterator(dirent_tree *ptr) noexcept:
|
||||
if (m_ptr) {
|
||||
++(*this); // Find the first file
|
||||
} else {
|
||||
memset((void *) current.name, 0, sizeof(current.name));
|
||||
memset((void *) current.path, 0, sizeof(current.path));
|
||||
current.size = 0;
|
||||
current.flags = 0;
|
||||
@ -73,7 +74,6 @@ retro::dirent_tree::dirent_iterator &retro::dirent_tree::dirent_iterator::operat
|
||||
if (!hasNext) {
|
||||
m_ptr = nullptr;
|
||||
memset((void *) current.path, 0, sizeof(current.path));
|
||||
memset((void *) current.name, 0, sizeof(current.name));
|
||||
current.flags = 0;
|
||||
current.size = 0;
|
||||
break;
|
||||
@ -87,7 +87,6 @@ retro::dirent_tree::dirent_iterator &retro::dirent_tree::dirent_iterator::operat
|
||||
int flags = retro_vfs_stat_impl(filePath, &size);
|
||||
if (is_regular_file(flags)) {
|
||||
// If we've found the next file to return to whoever's using this iterator...
|
||||
strncpy(current.name, fileName, sizeof(current.name));
|
||||
strncpy(current.path, filePath, sizeof(current.path));
|
||||
current.flags = flags;
|
||||
current.size = size;
|
||||
|
@ -31,13 +31,11 @@ namespace retro {
|
||||
}
|
||||
|
||||
struct dirent {
|
||||
char name[FILENAME_MAX];
|
||||
char path[PATH_MAX];
|
||||
int32_t size;
|
||||
int flags;
|
||||
|
||||
dirent() {
|
||||
memset((void *) name, 0, sizeof(name));
|
||||
memset((void *) path, 0, sizeof(path));
|
||||
size = 0;
|
||||
flags = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user