Commit 826a654c authored by Max Kellermann's avatar Max Kellermann

fs/DirectoryReader: use C++11 initializer

parent 08754e6c
......@@ -34,7 +34,7 @@
class DirectoryReader {
const HANDLE handle;
WIN32_FIND_DATA data;
bool first;
bool first = true;
class MakeWildcardPath {
PathTraitsFS::pointer path;
......@@ -63,8 +63,8 @@ public:
* Creates new directory reader for the specified #dir.
*/
explicit DirectoryReader(Path dir)
:handle(FindFirstFile(MakeWildcardPath(dir.c_str()), &data)),
first(true) {}
:handle(FindFirstFile(MakeWildcardPath(dir.c_str()), &data)) {
}
DirectoryReader(const DirectoryReader &other) = delete;
DirectoryReader &operator=(const DirectoryReader &other) = delete;
......@@ -113,14 +113,14 @@ public:
*/
class DirectoryReader {
DIR *const dirp;
dirent *ent;
dirent *ent = nullptr;
public:
/**
* Creates new directory reader for the specified #dir.
*/
explicit DirectoryReader(Path dir)
: dirp(opendir(dir.c_str())),
ent(nullptr) {
:dirp(opendir(dir.c_str())) {
}
DirectoryReader(const DirectoryReader &other) = delete;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment