Commit 542e7feb authored by Max Kellermann's avatar Max Kellermann

input/rewind: include cleanup

parent dc085e0b
...@@ -20,11 +20,9 @@ ...@@ -20,11 +20,9 @@
#include "config.h" #include "config.h"
#include "RewindInputPlugin.hxx" #include "RewindInputPlugin.hxx"
#include "../InputStream.hxx" #include "../InputStream.hxx"
#include "../InputPlugin.hxx"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdio.h>
class RewindInputStream final : public InputStream { class RewindInputStream final : public InputStream {
InputStream *input; InputStream *input;
...@@ -161,13 +159,13 @@ RewindInputStream::Read(void *ptr, size_t read_size, Error &error) ...@@ -161,13 +159,13 @@ RewindInputStream::Read(void *ptr, size_t read_size, Error &error)
} }
inline bool inline bool
RewindInputStream::Seek(InputPlugin::offset_type new_offset, int whence, RewindInputStream::Seek(offset_type new_offset, int whence,
Error &error) Error &error)
{ {
assert(IsReady()); assert(IsReady());
if (whence == SEEK_SET && tail > 0 && if (whence == SEEK_SET && tail > 0 &&
new_offset <= (InputPlugin::offset_type)tail) { new_offset <= (offset_type)tail) {
/* buffered seek */ /* buffered seek */
assert(!ReadingFromBuffer() || assert(!ReadingFromBuffer() ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment