Skip to content

Commit

Permalink
Additonal changes to answer Clément's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-guyot-infomaniak committed Oct 14, 2024
1 parent 2649589 commit 078b1fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
10 changes: 3 additions & 7 deletions src/libsyncengine/progress/syncfileitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@

namespace KDC {

SyncFileItem::SyncFileItem() :
_type(NodeType::Unknown), _newPath(std::nullopt), _localNodeId(std::nullopt), _remoteNodeId(std::nullopt),
_direction(SyncDirection::Unknown), _instruction(SyncFileInstruction::None), _status(SyncFileStatus::Unknown),
_conflict(ConflictType::None), _inconsistency(InconsistencyType::None), _size(0) {}
SyncFileItem::SyncFileItem() {}

SyncFileItem::SyncFileItem(NodeType type, const SyncPath &path, const std::optional<SyncPath> &newPath,
const std::optional<NodeId> &localNodeId, const std::optional<NodeId> &remoteNodeId,
Expand All @@ -38,8 +35,7 @@ SyncFileItem::SyncFileItem(NodeType type, const SyncPath &path, const std::optio
const std::optional<NodeId> &remoteNodeId, SyncDirection direction, SyncFileInstruction instruction,
ConflictType conflict, int64_t size) :
_type(type),
_path(path), _newPath(std::nullopt), _localNodeId(localNodeId), _remoteNodeId(remoteNodeId), _direction(direction),
_instruction(instruction), _status(SyncFileStatus::Unknown), _conflict(conflict), _inconsistency(InconsistencyType::None),
_cancelType(CancelType::None), _size(size) {}
_path(path), _localNodeId(localNodeId), _remoteNodeId(remoteNodeId), _direction(direction), _instruction(instruction),
_conflict(conflict), _size(size) {}

} // namespace KDC
22 changes: 11 additions & 11 deletions src/libsyncengine/progress/syncfileitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ class SyncFileItem {
inline bool isDirectory() const { return _type == NodeType::Directory; }

private:
NodeType _type;
NodeType _type{NodeType::Unknown};
SyncPath _path; // Sync folder relative filesystem path
std::optional<SyncPath> _newPath;
std::optional<NodeId> _localNodeId;
std::optional<NodeId> _remoteNodeId;
SyncDirection _direction;
SyncFileInstruction _instruction;
SyncFileStatus _status;
ConflictType _conflict;
InconsistencyType _inconsistency;
CancelType _cancelType;
std::optional<SyncPath> _newPath{std::nullopt};
std::optional<NodeId> _localNodeId{std::nullopt};
std::optional<NodeId> _remoteNodeId{std::nullopt};
SyncDirection _direction{SyncDirection::Unknown};
SyncFileInstruction _instruction{SyncFileInstruction::None};
SyncFileStatus _status{SyncFileStatus::Unknown};
ConflictType _conflict{ConflictType::None};
InconsistencyType _inconsistency{InconsistencyType::None};
CancelType _cancelType{CancelType::None};
std::string _error;
int64_t _size;
int64_t _size{0};
time_t _modTime{0};
time_t _creationTime{0};
bool _dehydrated{false};
Expand Down

0 comments on commit 078b1fa

Please sign in to comment.