fs/DirectoryReader: GetEntry() returns Path, not AllocatedPath

Reduce overhead, don't duplicate the string.
This commit is contained in:
Max Kellermann 2014-01-30 22:05:03 +01:00
parent a631200cca
commit c02f146791

View File

@ -21,7 +21,7 @@
#define MPD_FS_DIRECTORY_READER_HXX #define MPD_FS_DIRECTORY_READER_HXX
#include "check.h" #include "check.h"
#include "AllocatedPath.hxx" #include "Path.hxx"
#include <dirent.h> #include <dirent.h>
@ -78,9 +78,9 @@ public:
/** /**
* Extracts directory entry that was previously read by #ReadEntry. * Extracts directory entry that was previously read by #ReadEntry.
*/ */
AllocatedPath GetEntry() const { Path GetEntry() const {
assert(HasEntry()); assert(HasEntry());
return AllocatedPath::FromFS(ent->d_name); return Path::FromFS(ent->d_name);
} }
}; };