mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
More fixes.
Took 4 minutes Took 4 seconds
This commit is contained in:
parent
48780ccc24
commit
e4dc46ce37
6 changed files with 32 additions and 7 deletions
|
|
@ -72,7 +72,19 @@ protected:
|
|||
static SetNameMap sets;
|
||||
ICardSetPriorityController *cardSetPriorityController;
|
||||
|
||||
/** @brief Snapshot the current parse is filling, or nullptr when emitting signals. */
|
||||
/**
|
||||
* @brief Snapshot the current parse is filling, or nullptr when emitting signals.
|
||||
*
|
||||
* This is an implicit-inheritance-via-member-variable pattern: parseFileInto()
|
||||
* sets this before delegating to parseFile(), and loadCardsFromXml() /
|
||||
* loadFormats() check it to decide between direct insertion and signal
|
||||
* emission. Safe under the current model because loadFromFileMutex serialises
|
||||
* all parser access and parseFile() is never re-entered. If a future change
|
||||
* adds parallel parsing or a second parseFileInto() call within parseFile(),
|
||||
* this pointer would race -- at that point refactor to pass CardDatabaseData*
|
||||
* through the call chain instead. However, we are mostly RAM, not CPU bound on
|
||||
* DB startup at this point so there's not much point to parallel parsing.
|
||||
*/
|
||||
CardDatabaseData *targetData = nullptr;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue