From 896015bf533c6bbca3026f6d47400d7241a3935a Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Sun, 5 May 2013 13:34:12 +0600 Subject: DirectoryReader: rename Failed() to HasFailed() for consistency with TextFile --- src/Mapper.cxx | 2 +- src/fs/DirectoryReader.hxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mapper.cxx b/src/Mapper.cxx index 559df0d23..40e762e4b 100644 --- a/src/Mapper.cxx +++ b/src/Mapper.cxx @@ -100,7 +100,7 @@ check_directory(const char *path_utf8, const Path &path_fs) #endif const DirectoryReader reader(path_fs); - if (reader.Failed() && errno == EACCES) + if (reader.HasFailed() && errno == EACCES) g_warning("No permission to read directory: %s", path_utf8); } diff --git a/src/fs/DirectoryReader.hxx b/src/fs/DirectoryReader.hxx index caa1e90ec..4e4a56345 100644 --- a/src/fs/DirectoryReader.hxx +++ b/src/fs/DirectoryReader.hxx @@ -47,14 +47,14 @@ public: * Destroys this instance. */ ~DirectoryReader() { - if (!Failed()) + if (!HasFailed()) closedir(dirp); } /** * Checks if directory failed to open. */ - bool Failed() const { + bool HasFailed() const { return dirp == nullptr; } @@ -62,7 +62,7 @@ public: * Checks if directory entry is available. */ bool HasEntry() const { - assert(!Failed()); + assert(!HasFailed()); return ent != nullptr; } @@ -70,7 +70,7 @@ public: * Reads next directory entry. */ bool ReadEntry() { - assert(!Failed()); + assert(!HasFailed()); ent = readdir(dirp); return HasEntry(); } -- cgit v1.2.3