In CheckAndUpdateMostListenedSong() accept Song by value instead of a pointer.
This commit is contained in:
parent
c7f6b3072d
commit
9b14d7846b
@ -46,8 +46,8 @@ var mostListened MostListenedSong
|
|||||||
//
|
//
|
||||||
// So it would be fairer to give these listeners back to a song they was
|
// So it would be fairer to give these listeners back to a song they was
|
||||||
// listening to.
|
// listening to.
|
||||||
func CheckAndUpdateMostListenedSong(cur *Song) {
|
func CheckAndUpdateMostListenedSong(cur Song) {
|
||||||
if cur == nil || cur.Artist == "" {
|
if cur.Artist == "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if cur.MaxListeners > mostListened.Listeners {
|
if cur.MaxListeners > mostListened.Listeners {
|
||||||
|
Loading…
Reference in New Issue
Block a user