diff options
author | Max Kellermann <max@duempel.org> | 2014-08-27 19:11:55 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-28 06:42:19 +0200 |
commit | 39529204925c95c1ae38fee25df334f3c3a1a4a7 (patch) | |
tree | 80265280e7557858814158b7ea0a6f5f65be8847 /src/command | |
parent | c2001a725978b665f0b22a4ad3865293754efd38 (diff) |
Playlist: use std::chrono::duration for Seek*()
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/PlayerCommands.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index f167b0edb..7b033368a 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -300,11 +300,12 @@ handle_clearerror(gcc_unused Client &client, CommandResult handle_seek(Client &client, gcc_unused unsigned argc, char *argv[]) { - unsigned song, seek_time; + unsigned song; + SongTime seek_time; if (!check_unsigned(client, &song, argv[1])) return CommandResult::ERROR; - if (!check_unsigned(client, &seek_time, argv[2])) + if (!ParseCommandArg(client, seek_time, argv[2])) return CommandResult::ERROR; PlaylistResult result = @@ -315,11 +316,12 @@ handle_seek(Client &client, gcc_unused unsigned argc, char *argv[]) CommandResult handle_seekid(Client &client, gcc_unused unsigned argc, char *argv[]) { - unsigned id, seek_time; + unsigned id; + SongTime seek_time; if (!check_unsigned(client, &id, argv[1])) return CommandResult::ERROR; - if (!check_unsigned(client, &seek_time, argv[2])) + if (!ParseCommandArg(client, seek_time, argv[2])) return CommandResult::ERROR; PlaylistResult result = @@ -332,8 +334,8 @@ handle_seekcur(Client &client, gcc_unused unsigned argc, char *argv[]) { const char *p = argv[1]; bool relative = *p == '+' || *p == '-'; - int seek_time; - if (!check_int(client, &seek_time, p)) + SignedSongTime seek_time; + if (!ParseCommandArg(client, seek_time, p)) return CommandResult::ERROR; PlaylistResult result = |