Fix clang style warnings in webrtc/base
Mostly this consists of marking functions with override when
applicable, and moving function bodies from .h to .cc files.
Not inlining virtual functions with simple bodies such as
{ return false; }
strikes me as probably losing more in readability than we gain in
binary size and compilation time, but I guess it's just like any other
case where enabling a generally good warning forces us to write
slightly worse code in a couple of places.
BUG=163
R=kjellander@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/47429004
Cr-Commit-Position: refs/heads/master@{#8656}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8656 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -45,20 +45,24 @@ public:
|
||||
TransformAdapter(StreamInterface * stream,
|
||||
TransformInterface * transform,
|
||||
bool direction_read);
|
||||
virtual ~TransformAdapter();
|
||||
|
||||
virtual StreamResult Read(void * buffer, size_t buffer_len,
|
||||
size_t * read, int * error);
|
||||
virtual StreamResult Write(const void * data, size_t data_len,
|
||||
size_t * written, int * error);
|
||||
virtual void Close();
|
||||
~TransformAdapter() override;
|
||||
|
||||
StreamResult Read(void* buffer,
|
||||
size_t buffer_len,
|
||||
size_t* read,
|
||||
int* error) override;
|
||||
StreamResult Write(const void* data,
|
||||
size_t data_len,
|
||||
size_t* written,
|
||||
int* error) override;
|
||||
void Close() override;
|
||||
|
||||
// Apriori, we can't tell what the transformation does to the stream length.
|
||||
virtual bool GetAvailable(size_t* size) const { return false; }
|
||||
virtual bool ReserveSize(size_t size) { return true; }
|
||||
bool GetAvailable(size_t* size) const override;
|
||||
bool ReserveSize(size_t size) override;
|
||||
|
||||
// Transformations might not be restartable
|
||||
virtual bool Rewind() { return false; }
|
||||
virtual bool Rewind();
|
||||
|
||||
private:
|
||||
enum State { ST_PROCESSING, ST_FLUSHING, ST_COMPLETE, ST_ERROR };
|
||||
|
||||
Reference in New Issue
Block a user