core/tags/track: Remove track::compare_date()

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-10-28 04:27:53 -04:00
parent 24d5c37a6c
commit fb4933e418
3 changed files with 1 additions and 16 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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.