[CardDatabase] Pass CardInfoPtr by const ref (#6998)
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Debian, DEB, 13) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Debian, DEB, skip, 12) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Fedora, RPM, 44) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Fedora, RPM, skip, 43) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Servatrice_Debian, DEB, yes, skip, 12) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Ubuntu, DEB, 26.04) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (Ubuntu, DEB, skip, 24.04) (push) Blocked by required conditions
Build Desktop / ${{ matrix.distro }} ${{ matrix.version }} (yes, Arch, skip) (push) Blocked by required conditions
Build Desktop / ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (7d, Ninja, 1, macOS, -macOS14, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.11.0, macos-14, Apple, 14, Release,… (push) Blocked by required conditions
Build Desktop / ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (7d, Ninja, 1, macOS, -macOS15, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.11.0, macos-15, Apple, 15, Release,… (push) Blocked by required conditions
Build Desktop / ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (7d, Ninja, 1, macOS, 13, -macOS13_Intel, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.11.0, macos-15-intel, Int… (push) Blocked by required conditions
Build Desktop / ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (7d, Ninja, macOS, clang_64, qtimageformats qtmultimedia qtwebsockets, 6.11.0, macos-15, Apple, 15, Debug, 1, 16.4) (push) Blocked by required conditions
Build Desktop / ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} (Visual Studio 18 2026, x64, 1, Windows, -Win10, win64_msvc2022_64, qtimageformats qtmultimedia qtwebsockets, 6.11.0, win… (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run

* [CardDatabase] Pass CardInfoPtr by const ref

* trailing newline
This commit is contained in:
RickyRister
2026-06-14 04:46:18 -07:00
committed by GitHub
parent 5ffe344779
commit 0f3e6fbe26
2 changed files with 9 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ void CardDatabase::refreshCachedReverseRelatedCards()
}
}
void CardDatabase::addCard(CardInfoPtr card)
void CardDatabase::addCard(const CardInfoPtr &card)
{
if (card == nullptr) {
qCWarning(CardDatabaseLog) << "CardDatabase::addCard(nullptr)";
@@ -118,7 +118,7 @@ void CardDatabase::addCard(CardInfoPtr card)
emit cardAdded(card);
}
void CardDatabase::removeCard(CardInfoPtr card)
void CardDatabase::removeCard(const CardInfoPtr &card)
{
if (card.isNull()) {
qCWarning(CardDatabaseLog) << "CardDatabase::removeCard(nullptr)";
@@ -143,7 +143,7 @@ void CardDatabase::removeCard(CardInfoPtr card)
emit cardRemoved(card);
}
void CardDatabase::addSet(CardSetPtr set)
void CardDatabase::addSet(const CardSetPtr &set)
{
sets.insert(set->getShortName(), set);
}
@@ -215,7 +215,7 @@ void CardDatabase::notifyEnabledSetsChanged()
emit cardDatabaseEnabledSetsChanged();
}
void CardDatabase::addFormat(FormatRulesPtr format)
void CardDatabase::addFormat(const FormatRulesPtr &format)
{
formats.insert(format->formatName.toLower(), format);
}
}

View File

@@ -88,7 +88,7 @@ public:
* @brief Removes a card from the database.
* @param card Pointer to the card to remove.
*/
void removeCard(CardInfoPtr card);
void removeCard(const CardInfoPtr &card);
/** @brief Clears all cards, sets, and internal state. */
void clear();
@@ -140,15 +140,15 @@ public slots:
* @brief Adds a card to the database.
* @param card CardInfoPtr to add.
*/
void addCard(CardInfoPtr card);
void addCard(const CardInfoPtr &card);
/**
* @brief Adds a set to the database.
* @param set Pointer to CardSet to add.
*/
void addSet(CardSetPtr set);
void addSet(const CardSetPtr &set);
void addFormat(FormatRulesPtr format);
void addFormat(const FormatRulesPtr &format);
/** @brief Loads card databases from configured paths. */
void loadCardDatabases();