diff options
author | kwiberg@webrtc.org <kwiberg@webrtc.org> | 2015-03-09 22:21:53 +0000 |
---|---|---|
committer | kwiberg@webrtc.org <kwiberg@webrtc.org> | 2015-03-09 22:24:25 +0000 |
commit | 67186fe00cc68cbe03aa66d17fb4962458ca96d2 (patch) | |
tree | 6ef2b0c9b722ee565836e1f7812094eeb7968d2a /webrtc/base/buffer.h | |
parent | 2989204130f9a4c20e3e903d38218df932d9f69d (diff) | |
download | webrtc-67186fe00cc68cbe03aa66d17fb4962458ca96d2.tar.gz |
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
Diffstat (limited to 'webrtc/base/buffer.h')
-rw-r--r-- | webrtc/base/buffer.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h index ddab0fb6f0..a7bc570516 100644 --- a/webrtc/base/buffer.h +++ b/webrtc/base/buffer.h @@ -22,18 +22,11 @@ namespace rtc { // 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(); } |