diff --git a/src/song.cpp b/src/song.cpp index ff76a931..c6dd528e 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -466,57 +466,6 @@ MPD::Song &MPD::Song::operator=(const MPD::Song &s) return *this; } -bool MPD::Song::operator==(const Song &s) const -{ - return (itsSong->file && s.itsSong->file - ? strcmp(itsSong->file, s.itsSong->file) == 0 - : !(itsSong->file || s.itsSong->file)) - && (itsSong->title && s.itsSong->title - ? strcmp(itsSong->title, s.itsSong->title) == 0 - : !(itsSong->title || s.itsSong->title)) - && (itsSong->artist && s.itsSong->artist - ? strcmp(itsSong->artist, s.itsSong->artist) == 0 - : !(itsSong->artist || s.itsSong->artist)) - && (itsSong->album && s.itsSong->album - ? strcmp(itsSong->album, s.itsSong->album) == 0 - : !(itsSong->album || s.itsSong->album)) - && (itsSong->track && s.itsSong->track - ? strcmp(itsSong->track, s.itsSong->track) == 0 - : !(itsSong->track || s.itsSong->track)) - && (itsSong->date && s.itsSong->date - ? strcmp(itsSong->date, s.itsSong->date) == 0 - : !(itsSong->date || s.itsSong->date)) - && (itsSong->genre && s.itsSong->genre - ? strcmp(itsSong->genre, s.itsSong->genre) == 0 - : !(itsSong->genre || s.itsSong->genre)) - && (itsSong->composer && s.itsSong->composer - ? strcmp(itsSong->composer, s.itsSong->composer) == 0 - : !(itsSong->composer || s.itsSong->composer)) - && (itsSong->performer && s.itsSong->performer - ? strcmp(itsSong->performer, s.itsSong->performer) == 0 - : !(itsSong->performer || s.itsSong->performer)) - && (itsSong->disc && s.itsSong->disc - ? strcmp(itsSong->disc, s.itsSong->disc) == 0 - : !(itsSong->disc || s.itsSong->disc)) - && (itsSong->comment && s.itsSong->comment - ? strcmp(itsSong->comment, s.itsSong->comment) == 0 - : !(itsSong->comment || s.itsSong->comment)) - && itsSong->time == s.itsSong->time - && itsSong->pos == s.itsSong->pos - && itsSong->id == s.itsSong->id - && itsHash == s.itsHash; -} - -bool MPD::Song::operator!=(const Song &s) const -{ - return !operator==(s); -} - -bool MPD::Song::operator<(const Song &s) const -{ - return itsSong->pos < s.itsSong->pos; -} - std::string MPD::Song::ShowTime(int length) { std::ostringstream ss; diff --git a/src/song.h b/src/song.h index c6ab00c6..fccbc782 100644 --- a/src/song.h +++ b/src/song.h @@ -90,9 +90,6 @@ namespace MPD bool Localized() const { return isLocalised; } Song &operator=(const Song &); - bool operator==(const Song &) const; - bool operator!=(const Song &) const; - bool operator<(const Song &rhs) const; static std::string ShowTime(int); private: