change abs() to std::abs()

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-24 16:54:50 -07:00 committed by Max Kellermann
parent 01e00632cc
commit e41a52d909

View File

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