mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-30 12:59:16 -05:00
[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
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user