Non pointer stuff

Took 52 seconds
This commit is contained in:
Lukas Brübach 2025-12-31 13:51:39 +01:00
parent 07a67e5854
commit 1d3df50ed1

View file

@ -41,26 +41,26 @@ void DeckListStatisticsAnalyzer::analyze()
// per-type curve // per-type curve
for (auto &t : types) { for (auto &t : types) {
manaCurveByType[t][cmc]++; manaCurveByType[t][cmc]++;
manaCurveCardsByType[t][cmc].append(info->getName()); manaCurveCardsByType[t][cmc].append(info.getName());
} }
// Per-subtype curve // Per-subtype curve
for (auto &st : subtypes) { for (auto &st : subtypes) {
manaCurveBySubtype[st][cmc]++; manaCurveBySubtype[st][cmc]++;
manaCurveCardsBySubtype[st][cmc].append(info->getName()); manaCurveCardsBySubtype[st][cmc].append(info.getName());
} }
// per-color curve // per-color curve
for (auto &c : colors) { for (auto &c : colors) {
manaCurveByColor[c][cmc]++; manaCurveByColor[c][cmc]++;
manaCurveCardsByColor[c][cmc].append(info->getName()); manaCurveCardsByColor[c][cmc].append(info.getName());
} }
// Power/toughness // Power/toughness
manaCurveByPower[QString::number(power)][cmc]++; manaCurveByPower[QString::number(power)][cmc]++;
manaCurveCardsByPower[QString::number(power)][cmc].append(info->getName()); manaCurveCardsByPower[QString::number(power)][cmc].append(info.getName());
manaCurveByToughness[QString::number(toughness)][cmc]++; manaCurveByToughness[QString::number(toughness)][cmc]++;
manaCurveCardsByToughness[QString::number(toughness)][cmc].append(info->getName()); manaCurveCardsByToughness[QString::number(toughness)][cmc].append(info.getName());
// ========== Category Counts =========== // ========== Category Counts ===========
for (auto &t : types) { for (auto &t : types) {
@ -76,7 +76,7 @@ void DeckListStatisticsAnalyzer::analyze()
// ---------------- Mana Base ---------------- // ---------------- Mana Base ----------------
if (config.computeManaBase) { if (config.computeManaBase) {
auto prod = determineManaProduction(info->getText()); auto prod = determineManaProduction(info.getText());
for (auto it = prod.begin(); it != prod.end(); ++it) { for (auto it = prod.begin(); it != prod.end(); ++it) {
if (it.value() > 0) { if (it.value() > 0) {
productionPipCount[it.key()] += it.value(); productionPipCount[it.key()] += it.value();
@ -88,7 +88,7 @@ void DeckListStatisticsAnalyzer::analyze()
// ---------------- Devotion ---------------- // ---------------- Devotion ----------------
if (config.computeDevotion) { if (config.computeDevotion) {
auto devo = countManaSymbols(info->getManaCost()); auto devo = countManaSymbols(info.getManaCost());
for (auto &d : devo) { for (auto &d : devo) {
if (d.second > 0) { if (d.second > 0) {
devotionPipCount[QString(d.first)] += d.second; devotionPipCount[QString(d.first)] += d.second;