From 3d371ea70f8b3bb21290784193f4fdc0cd91e294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Sat, 15 Nov 2025 13:22:09 +0100 Subject: [PATCH] Remove redundant .cpp function documentation. Took 15 minutes --- .../card_picture_loader_local.cpp | 6 ---- .../card_picture_loader_worker.cpp | 7 ----- .../card_picture_loader_worker_work.cpp | 16 ---------- .../card_picture_to_load.cpp | 29 ------------------- 4 files changed, 58 deletions(-) diff --git a/cockatrice/src/interface/card_picture_loader/card_picture_loader_local.cpp b/cockatrice/src/interface/card_picture_loader/card_picture_loader_local.cpp index 33a78ddaf..dd00e6e1d 100644 --- a/cockatrice/src/interface/card_picture_loader/card_picture_loader_local.cpp +++ b/cockatrice/src/interface/card_picture_loader/card_picture_loader_local.cpp @@ -47,12 +47,6 @@ void CardPictureLoaderLocal::refreshIndex() << customFolderIndex.size() << "entries."; } -/** - * Tries to load the card image from the local images. - * - * @param toLoad The card to load - * @return The loaded image, or an empty QImage if loading failed. - */ QImage CardPictureLoaderLocal::tryLoad(const ExactCard &toLoad) const { PrintingInfo setInstance = toLoad.getPrinting(); diff --git a/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker.cpp b/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker.cpp index 4a831c24a..a2da3c953 100644 --- a/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker.cpp +++ b/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker.cpp @@ -105,9 +105,6 @@ void CardPictureLoaderWorker::resetRequestQuota() processQueuedRequests(); } -/** - * Keeps processing requests from the queue until it is empty or until the quota runs out. - */ void CardPictureLoaderWorker::processQueuedRequests() { while (requestQuota > 0 && processSingleRequest()) { @@ -115,10 +112,6 @@ void CardPictureLoaderWorker::processQueuedRequests() } } -/** - * Immediately processes a single queued request. No-ops if the load queue is empty - * @return If a request was processed - */ bool CardPictureLoaderWorker::processSingleRequest() { if (!requestLoadQueue.isEmpty()) { diff --git a/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker_work.cpp b/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker_work.cpp index 07478ee70..e74103419 100644 --- a/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker_work.cpp +++ b/cockatrice/src/interface/card_picture_loader/card_picture_loader_worker_work.cpp @@ -51,10 +51,6 @@ void CardPictureLoaderWorkerWork::startNextPicDownload() } } -/** - * Starts another pic download using the next possible url combination for the card. - * If all possibilities are exhausted, then concludes the image loading with an empty QImage. - */ void CardPictureLoaderWorkerWork::picDownloadFailed() { /* Take advantage of short-circuiting here to call the nextUrl until one @@ -73,10 +69,6 @@ void CardPictureLoaderWorkerWork::picDownloadFailed() } } -/** - * - * @param reply The reply. Takes ownership of the object - */ void CardPictureLoaderWorkerWork::handleNetworkReply(QNetworkReply *reply) { QVariant redirectTarget = reply->attribute(QNetworkRequest::RedirectionTargetAttribute); @@ -180,10 +172,6 @@ void CardPictureLoaderWorkerWork::handleSuccessfulReply(QNetworkReply *reply) } } -/** - * @param reply The reply to load the image from - * @return The loaded image, or an empty QImage if loading failed - */ QImage CardPictureLoaderWorkerWork::tryLoadImageFromReply(QNetworkReply *reply) { static constexpr int riffHeaderSize = 12; // RIFF_HEADER_SIZE from webp/format_constants.h @@ -207,10 +195,6 @@ QImage CardPictureLoaderWorkerWork::tryLoadImageFromReply(QNetworkReply *reply) return imgReader.read(); } -/** - * Call this method when the image has finished being loaded. - * @param image The image that was loaded. Empty QImage indicates failure. - */ void CardPictureLoaderWorkerWork::concludeImageLoad(const QImage &image) { emit imageLoaded(cardToDownload.getCard(), image); diff --git a/cockatrice/src/interface/card_picture_loader/card_picture_to_load.cpp b/cockatrice/src/interface/card_picture_loader/card_picture_to_load.cpp index 3727988ad..1ba1a9ca3 100644 --- a/cockatrice/src/interface/card_picture_loader/card_picture_to_load.cpp +++ b/cockatrice/src/interface/card_picture_loader/card_picture_to_load.cpp @@ -20,12 +20,6 @@ CardPictureToLoad::CardPictureToLoad(const ExactCard &_card) } } -/** - * Extracts a list of all the sets from the card, sorted in priority order. - * If the card does not contain any sets, then a dummy set will be inserted into the list. - * - * @return A list of sets. Will not be empty. - */ QList CardPictureToLoad::extractSetsSorted(const ExactCard &card) { QList sortedSets; @@ -52,19 +46,6 @@ QList CardPictureToLoad::extractSetsSorted(const ExactCard &card) return sortedSets; } -/** - * Finds the PrintingInfo corresponding to the exactCards's card name that belongs to a given set and has the - * exactCards's providerId. - * If the set name is in the CardInfo, but no printings in that set match the card's providerId, then the first - * PrintingInfo for the set is returned. - * - * This method only exists to maintain existing behavior. - * TODO: check if going through all sets is still necessary after the ExactCard refactor. - * - * @param card The card to look in - * @param setName The set's short name - * @return A PrintingInfo, or a default-constructed PrintingInfo if the set name is not in the CardInfo. - */ static PrintingInfo findPrintingForSet(const ExactCard &card, const QString &setName) { SetToPrintingsMap setsToPrintings = card.getInfo().getSets(); @@ -109,11 +90,6 @@ void CardPictureToLoad::populateSetUrls() (void)nextUrl(); } -/** - * Advances the currentSet to the next set in the list. Then repopulates the url list with the urls from that set. - * If we are already at the end of the list, then currentSet is set to empty. - * @return If we are already at the end of the list - */ bool CardPictureToLoad::nextSet() { if (!sortedSets.isEmpty()) { @@ -125,11 +101,6 @@ bool CardPictureToLoad::nextSet() return false; } -/** - * Advances the currentUrl to the next url in the list. - * If we are already at the end of the list, then currentUrl is set to empty. - * @return If we are already at the end of the list - */ bool CardPictureToLoad::nextUrl() { if (!currentSetUrls.isEmpty()) {