a bit better but still not optimal

This commit is contained in:
2023-06-08 14:35:59 +02:00
parent f59950d852
commit f7a5c4af48
8 changed files with 58 additions and 76 deletions

View File

@@ -26,7 +26,7 @@ public:
static inline const std::unordered_map<Type, std::string> TypeToStr{{Type::Normal, "normal"}, {Type::Symlink, "symlink"}, {Type::Directory, "directory"}};
File(Object::idType id, std::string name, unsigned long long bytes, unsigned long long mtime, std::string SHA, std::vector<idType> chunks, Type fileType);
File(Object::idType id, std::string name, unsigned long long bytes, unsigned long long mtime, std::string SHA, std::map<size_t, idType> chunks, Type fileType);
/// Deserialization constructor
File(std::vector<char>::const_iterator &in, const std::vector<char>::const_iterator &end);
@@ -69,7 +69,7 @@ public:
/// List of the chunks in file
/// Normal file has normal chunks as its contents, for Directory it's empty, Symlink has a chunk with its target path
const std::vector<idType> chunks;
const std::map<size_t, idType> chunks;
};