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:
kwiberg@webrtc.org
2015-03-09 22:21:53 +00:00
parent 2989204130
commit 67186fe00c
111 changed files with 1610 additions and 1061 deletions

View File

@ -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 };