More fixes.

Took 4 minutes


Took 4 seconds
This commit is contained in:
Lukas Brübach 2026-07-27 12:42:04 +02:00
parent 48780ccc24
commit e4dc46ce37
6 changed files with 32 additions and 7 deletions

View file

@ -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;
/**