Skip to content

Commit

Permalink
Manual inline requestUncachedCoverPrivate()
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Nov 12, 2023
1 parent c8f308d commit 2f956ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
14 changes: 9 additions & 5 deletions src/library/coverartcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,17 @@ QPixmap CoverArtCache::getCachedCover(
}

// static
void CoverArtCache::requestUncachedCoverPrivate(
void CoverArtCache::requestUncachedCover(
const QObject* pRequester,
const TrackPointer& pTrack,
const CoverInfo& coverInfo,
int desiredWidth) {
CoverArtCache* pCache = CoverArtCache::instance();
VERIFY_OR_DEBUG_ASSERT(pCache) {
return;
return;
}
pCache->tryLoadCover(
pRequester,
pTrack,
TrackPointer(),
coverInfo,
desiredWidth);
}
Expand All @@ -131,7 +130,12 @@ void CoverArtCache::requestUncachedCover(
VERIFY_OR_DEBUG_ASSERT(pTrack) {
return;
}
requestUncachedCoverPrivate(

CoverArtCache* pCache = CoverArtCache::instance();
VERIFY_OR_DEBUG_ASSERT(pCache) {
return;
}
pCache->tryLoadCover(
pRequester,
pTrack,
pTrack->getCoverInfoWithLocation(),
Expand Down
10 changes: 1 addition & 9 deletions src/library/coverartcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ class CoverArtCache : public QObject, public Singleton<CoverArtCache> {
static void requestUncachedCover(
const QObject* pRequester,
const CoverInfo& coverInfo,
int desiredWidth) {
requestUncachedCoverPrivate(pRequester, TrackPointer(), coverInfo, desiredWidth);
}
int desiredWidth);

static void requestUncachedCover(
const QObject* pRequester,
Expand Down Expand Up @@ -87,12 +85,6 @@ class CoverArtCache : public QObject, public Singleton<CoverArtCache> {
const CoverInfo& coverInfo,
int desiredWidth = 0); // <= 0: original size

static void requestUncachedCoverPrivate(
const QObject* pRequester,
const TrackPointer& /*optional*/ pTrack,
const CoverInfo& coverInfo,
int desiredWidth);

void tryLoadCover(
const QObject* pRequester,
const TrackPointer& pTrack,
Expand Down

0 comments on commit 2f956ee

Please sign in to comment.