mirror of https://github.com/google/snappy.git
Merge pull request #107 from jsteemann:bug-fix/fix-compile-warning
PiperOrigin-RevId: 340505526
This commit is contained in:
commit
368b01c8dd
|
@ -146,10 +146,10 @@ class Source {
|
||||||
class ByteArraySource : public Source {
|
class ByteArraySource : public Source {
|
||||||
public:
|
public:
|
||||||
ByteArraySource(const char* p, size_t n) : ptr_(p), left_(n) { }
|
ByteArraySource(const char* p, size_t n) : ptr_(p), left_(n) { }
|
||||||
virtual ~ByteArraySource();
|
~ByteArraySource() override;
|
||||||
virtual size_t Available() const;
|
size_t Available() const override;
|
||||||
virtual const char* Peek(size_t* len);
|
const char* Peek(size_t* len) override;
|
||||||
virtual void Skip(size_t n);
|
void Skip(size_t n) override;
|
||||||
private:
|
private:
|
||||||
const char* ptr_;
|
const char* ptr_;
|
||||||
size_t left_;
|
size_t left_;
|
||||||
|
@ -159,15 +159,15 @@ class ByteArraySource : public Source {
|
||||||
class UncheckedByteArraySink : public Sink {
|
class UncheckedByteArraySink : public Sink {
|
||||||
public:
|
public:
|
||||||
explicit UncheckedByteArraySink(char* dest) : dest_(dest) { }
|
explicit UncheckedByteArraySink(char* dest) : dest_(dest) { }
|
||||||
virtual ~UncheckedByteArraySink();
|
~UncheckedByteArraySink() override;
|
||||||
virtual void Append(const char* data, size_t n);
|
void Append(const char* data, size_t n) override;
|
||||||
virtual char* GetAppendBuffer(size_t len, char* scratch);
|
char* GetAppendBuffer(size_t len, char* scratch) override;
|
||||||
virtual char* GetAppendBufferVariable(
|
char* GetAppendBufferVariable(
|
||||||
size_t min_size, size_t desired_size_hint, char* scratch,
|
size_t min_size, size_t desired_size_hint, char* scratch,
|
||||||
size_t scratch_size, size_t* allocated_size);
|
size_t scratch_size, size_t* allocated_size) override;
|
||||||
virtual void AppendAndTakeOwnership(
|
void AppendAndTakeOwnership(
|
||||||
char* bytes, size_t n, void (*deleter)(void*, const char*, size_t),
|
char* bytes, size_t n, void (*deleter)(void*, const char*, size_t),
|
||||||
void *deleter_arg);
|
void *deleter_arg) override;
|
||||||
|
|
||||||
// Return the current output pointer so that a caller can see how
|
// Return the current output pointer so that a caller can see how
|
||||||
// many bytes were produced.
|
// many bytes were produced.
|
||||||
|
|
Loading…
Reference in New Issue