Run clang-tidy modernize-use-equals-{delete,default} on //net/websockets
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
In some cases the the tool leaves behind a string of commas where it
replaced a member initializer list
(https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up with:
git diff --name-only | \
xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/'
BUG=778959,778957
This CL was uploaded by git cl split.
[email protected]
Change-Id: I702f4d49f1d35ec98595a2eeaa5865b3cb4584df
Reviewed-on: https://chromium-review.googlesource.com/799597
Reviewed-by: Yutaka Hirano <[email protected]>
Commit-Queue: Chris Watkins <[email protected]>
Cr-Commit-Position: refs/heads/master@{#520457}
diff --git a/net/websockets/websocket_inflater.cc b/net/websockets/websocket_inflater.cc
index eac9e8c..892f506a 100644
--- a/net/websockets/websocket_inflater.cc
+++ b/net/websockets/websocket_inflater.cc
@@ -26,7 +26,7 @@
}
private:
- ~ShrinkableIOBufferWithSize() override {}
+ ~ShrinkableIOBufferWithSize() override = default;
};
} // namespace
@@ -171,7 +171,7 @@
head_(0),
tail_(0) {}
-WebSocketInflater::OutputBuffer::~OutputBuffer() {}
+WebSocketInflater::OutputBuffer::~OutputBuffer() = default;
size_t WebSocketInflater::OutputBuffer::Size() const {
return (tail_ + buffer_.size() - head_) % buffer_.size();
@@ -221,7 +221,7 @@
WebSocketInflater::InputQueue::InputQueue(size_t capacity)
: capacity_(capacity), head_of_first_buffer_(0), tail_of_last_buffer_(0) {}
-WebSocketInflater::InputQueue::~InputQueue() {}
+WebSocketInflater::InputQueue::~InputQueue() = default;
std::pair<char*, size_t> WebSocketInflater::InputQueue::Top() {
DCHECK(!IsEmpty());