mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 18:43:26 -08:00
[DeckSync] Use designated initializer for ServerFile per review
This commit is contained in:
parent
14b3de0826
commit
317b37db01
1 changed files with 6 additions and 5 deletions
|
|
@ -150,11 +150,12 @@ void DeckSyncManager::collectServerFiles(const ServerInfo_DeckStorage_Folder &fo
|
||||||
} else if (item.has_file()) {
|
} else if (item.has_file()) {
|
||||||
const QString path = prefix.isEmpty() ? name : prefix + "/" + name;
|
const QString path = prefix.isEmpty() ? name : prefix + "/" + name;
|
||||||
const ServerInfo_DeckStorage_File &file = item.file();
|
const ServerInfo_DeckStorage_File &file = item.file();
|
||||||
ServerFile entry;
|
ServerFile entry{
|
||||||
entry.id = item.id();
|
.id = item.id(),
|
||||||
entry.guid = QString::fromStdString(file.guid());
|
.guid = QString::fromStdString(file.guid()),
|
||||||
entry.hash = QString::fromStdString(file.hash());
|
.hash = QString::fromStdString(file.hash()),
|
||||||
entry.lastModifiedSecs = file.has_last_modified() ? static_cast<qint64>(file.last_modified()) : 0;
|
.lastModifiedSecs = file.has_last_modified() ? static_cast<qint64>(file.last_modified()) : 0,
|
||||||
|
};
|
||||||
files.insert(path, entry);
|
files.insert(path, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue