diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-15 13:44:34 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-18 17:25:05 -0500 |
| commit | 777d822f13fcd15fc5f5ac0bb45589460a1e16f1 (patch) | |
| tree | 213efff78d94ed7827e41e2b2d1039871dc37a9e /src/shared/fileentry.cpp | |
| parent | bbd9bb1fd90576b824f5adda0c3f33f2fcaa0f39 (diff) | |
cleanup, typedefs
Diffstat (limited to 'src/shared/fileentry.cpp')
| -rw-r--r-- | src/shared/fileentry.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shared/fileentry.cpp b/src/shared/fileentry.cpp index d4e1beb4..e57c3cc5 100644 --- a/src/shared/fileentry.cpp +++ b/src/shared/fileentry.cpp @@ -6,19 +6,19 @@ namespace MOShared { FileEntry::FileEntry() : - m_Index(UINT_MAX), m_Name(), m_Origin(-1), m_Parent(nullptr), + m_Index(InvalidFileIndex), m_Name(), m_Origin(-1), m_Parent(nullptr), m_FileSize(NoFileSize), m_CompressedFileSize(NoFileSize) { } -FileEntry::FileEntry(Index index, std::wstring name, DirectoryEntry *parent) : +FileEntry::FileEntry(FileIndex index, std::wstring name, DirectoryEntry *parent) : m_Index(index), m_Name(std::move(name)), m_Origin(-1), m_Archive(L"", -1), m_Parent(parent), m_FileSize(NoFileSize), m_CompressedFileSize(NoFileSize) { } void FileEntry::addOrigin( - int origin, FILETIME fileTime, std::wstring_view archive, int order) + OriginID origin, FILETIME fileTime, std::wstring_view archive, int order) { std::scoped_lock lock(m_OriginsMutex); @@ -83,7 +83,7 @@ void FileEntry::addOrigin( } } -bool FileEntry::removeOrigin(int origin) +bool FileEntry::removeOrigin(OriginID origin) { std::scoped_lock lock(m_OriginsMutex); @@ -116,7 +116,7 @@ bool FileEntry::removeOrigin(int origin) } } - int currentID = currentIter->first; + OriginID currentID = currentIter->first; m_Archive = currentIter->second; m_Alternatives.erase(currentIter); @@ -201,11 +201,11 @@ bool FileEntry::isFromArchive(std::wstring archiveName) const return false; } -std::wstring FileEntry::getFullPath(int originID) const +std::wstring FileEntry::getFullPath(OriginID originID) const { std::scoped_lock lock(m_OriginsMutex); - if (originID == -1) { + if (originID == InvalidOriginID) { bool ignore = false; originID = getOrigin(ignore); } |
