change abs() to std::abs()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
01e00632cc
commit
e41a52d909
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user