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
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h
index ddab0fb..a7bc570 100644
--- a/webrtc/base/buffer.h
+++ b/webrtc/base/buffer.h
@@ -22,18 +22,11 @@
// Unlike std::string/vector, does not initialize data when expanding capacity.
class Buffer {
public:
- Buffer() {
- Construct(NULL, 0, 0);
- }
- Buffer(const void* data, size_t length) {
- Construct(data, length, length);
- }
- Buffer(const void* data, size_t length, size_t capacity) {
- Construct(data, length, capacity);
- }
- Buffer(const Buffer& buf) {
- Construct(buf.data(), buf.length(), buf.length());
- }
+ Buffer();
+ Buffer(const void* data, size_t length);
+ Buffer(const void* data, size_t length, size_t capacity);
+ Buffer(const Buffer& buf);
+ ~Buffer();
const char* data() const { return data_.get(); }
char* data() { return data_.get(); }