mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
[DeckLoader] Make save/load methods static (#6476)
* const * [DeckLoader] make methods static * use static methods * add docs * add docs
This commit is contained in:
parent
c7c7bf550a
commit
d579c82cb9
11 changed files with 209 additions and 166 deletions
|
|
@ -78,10 +78,9 @@ void HomeWidget::initializeBackgroundFromSource()
|
|||
|
||||
void HomeWidget::loadBackgroundSourceDeck()
|
||||
{
|
||||
DeckLoader deckLoader = DeckLoader(this);
|
||||
deckLoader.loadFromFile(SettingsCache::instance().getDeckPath() + "background.cod", DeckFileFormat::Cockatrice,
|
||||
false);
|
||||
backgroundSourceDeck = deckLoader.getDeck().deckList;
|
||||
std::optional<LoadedDeck> deckOpt = DeckLoader::loadFromFile(
|
||||
SettingsCache::instance().getDeckPath() + "background.cod", DeckFileFormat::Cockatrice, false);
|
||||
backgroundSourceDeck = deckOpt.has_value() ? deckOpt.value().deckList : DeckList();
|
||||
}
|
||||
|
||||
void HomeWidget::updateRandomCard()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue