From 7860e927a771d6a07d9b1905071bd389a0e64001 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:10:27 -0500 Subject: removed dead insertFile() avoided a few string copies lowercase filename in thread --- src/shared/directoryentry.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/shared/directoryentry.h') diff --git a/src/shared/directoryentry.h b/src/shared/directoryentry.h index 772899d7..f8c72d77 100644 --- a/src/shared/directoryentry.h +++ b/src/shared/directoryentry.h @@ -80,7 +80,7 @@ public: AlternativesVector; FileEntry(); - FileEntry(Index index, std::wstring_view name, DirectoryEntry *parent); + FileEntry(Index index, std::wstring name, DirectoryEntry *parent); Index getIndex() const { @@ -263,7 +263,7 @@ public: bool indexValid(FileEntry::Index index) const; - FileEntry::Ptr createFile(std::wstring_view name, DirectoryEntry *parent); + FileEntry::Ptr createFile(std::wstring name, DirectoryEntry *parent); FileEntry::Ptr getFile(FileEntry::Index index) const; size_t size() const @@ -459,8 +459,6 @@ public: const FileEntry::Ptr searchFile( const std::wstring &path, const DirectoryEntry **directory=nullptr) const; - void insertFile(const std::wstring &filePath, FilesOrigin &origin, FILETIME fileTime); - void removeFile(FileEntry::Index index); // remove the specified file from the tree. This can be a path leading to a @@ -510,6 +508,10 @@ private: std::wstring_view fileName, FilesOrigin &origin, FILETIME fileTime, std::wstring_view archive, int order); + FileEntry::Ptr insert( + env::File& file, FilesOrigin &origin, + std::wstring_view archive, int order); + void addFiles( FilesOrigin &origin, wchar_t *buffer, int bufferOffset); -- cgit v1.3.1