diff --git a/src/queue/PlaylistEdit.cxx b/src/queue/PlaylistEdit.cxx index 50095d086..fb03b4e6d 100644 --- a/src/queue/PlaylistEdit.cxx +++ b/src/queue/PlaylistEdit.cxx @@ -327,7 +327,7 @@ playlist::MoveRange(PlayerControl &pc, throw PlaylistError::BadRange(); if ((to >= 0 && to + end - start - 1 >= GetLength()) || - (to < 0 && unsigned(abs(to)) > GetLength())) + (to < 0 && unsigned(std::abs(to)) > GetLength())) throw PlaylistError::BadRange(); if ((int)start == to) @@ -350,7 +350,7 @@ playlist::MoveRange(PlayerControl &pc, if (start <= (unsigned)currentSong && (unsigned)currentSong < end) /* no-op, can't be moved to offset of itself */ return; - to = (currentSong + abs(to)) % GetLength(); + to = (currentSong + std::abs(to)) % GetLength(); if (start < (unsigned)to) to -= end - start; }