mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[DeckSync] Use designated initializer for ServerFile per review
This commit is contained in:
parent
0cd238d296
commit
f22256886f
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()) {
|
||||
const QString path = prefix.isEmpty() ? name : prefix + "/" + name;
|
||||
const ServerInfo_DeckStorage_File &file = item.file();
|
||||
ServerFile entry;
|
||||
entry.id = item.id();
|
||||
entry.guid = QString::fromStdString(file.guid());
|
||||
entry.hash = QString::fromStdString(file.hash());
|
||||
entry.lastModifiedSecs = file.has_last_modified() ? static_cast<qint64>(file.last_modified()) : 0;
|
||||
ServerFile entry{
|
||||
.id = item.id(),
|
||||
.guid = QString::fromStdString(file.guid()),
|
||||
.hash = QString::fromStdString(file.hash()),
|
||||
.lastModifiedSecs = file.has_last_modified() ? static_cast<qint64>(file.last_modified()) : 0,
|
||||
};
|
||||
files.insert(path, entry);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue