From fb4933e418319c122a6ae2c67306728a9b04f468 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 28 Oct 2015 04:27:53 -0400 Subject: [PATCH] core/tags/track: Remove track::compare_date() Signed-off-by: Anna Schumaker --- core/queue.cpp | 2 +- core/tags/track.cpp | 5 ----- include/core/tags/track.h | 10 ---------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/core/queue.cpp b/core/queue.cpp index cb4f60a0..a789cef8 100644 --- a/core/queue.cpp +++ b/core/queue.cpp @@ -88,7 +88,7 @@ static inline int track_compare(struct track *lhs, struct track *rhs, sort_t fie case SORT_LENGTH: return lhs->tr_length - rhs->tr_length; case SORT_PLAYED: - return rhs->compare_date(rhs); + return date_compare(&lhs->tr_date, &rhs->tr_date); case SORT_TITLE: return lhs->compare(rhs); case SORT_TRACK: diff --git a/core/tags/track.cpp b/core/tags/track.cpp index 5d63a31b..cfc23527 100644 --- a/core/tags/track.cpp +++ b/core/tags/track.cpp @@ -94,11 +94,6 @@ void track :: played() track_db_commit(); } -int track :: compare_date(const struct track *rhs) -{ - return date_compare(&tr_date, &rhs->tr_date); -} - void track :: read(file &file) { unsigned int library_id, artist_id, album_id, genre_id; diff --git a/include/core/tags/track.h b/include/core/tags/track.h index 71ad5884..c6813976 100644 --- a/include/core/tags/track.h +++ b/include/core/tags/track.h @@ -79,16 +79,6 @@ struct track : public GenericTag { /** Increment Track::_count and set Track::_date to today's date. */ void played(); - /** - * Compare two tracks based on last played date. - * - * @param rhs The other track to compare. - * @return < 0: lhs < rhs. - * @return 0: lhs == rhs. - * @return > 0: lhs > rhs; - */ - int compare_date(const struct track *); - /** * Read track data from file.