Run clang-tidy modernize-use-equals-{delete,default} on //base
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
Change-Id: I95a3f3dae4796e4a7beb77793a6101f433a2c649
Reviewed-on: https://chromium-review.googlesource.com/789718
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Chris Watkins <[email protected]>
Cr-Commit-Position: refs/heads/master@{#520033}
diff --git a/base/tools_sanity_unittest.cc b/base/tools_sanity_unittest.cc
index af2081d3..5c41bd7 100644
--- a/base/tools_sanity_unittest.cc
+++ b/base/tools_sanity_unittest.cc
@@ -254,7 +254,7 @@
class TOOLS_SANITY_TEST_CONCURRENT_THREAD : public PlatformThread::Delegate {
public:
explicit TOOLS_SANITY_TEST_CONCURRENT_THREAD(bool *value) : value_(value) {}
- ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() override {}
+ ~TOOLS_SANITY_TEST_CONCURRENT_THREAD() override = default;
void ThreadMain() override {
*value_ = true;
@@ -270,7 +270,7 @@
class ReleaseStoreThread : public PlatformThread::Delegate {
public:
explicit ReleaseStoreThread(base::subtle::Atomic32 *value) : value_(value) {}
- ~ReleaseStoreThread() override {}
+ ~ReleaseStoreThread() override = default;
void ThreadMain() override {
base::subtle::Release_Store(value_, kMagicValue);
@@ -286,7 +286,7 @@
class AcquireLoadThread : public PlatformThread::Delegate {
public:
explicit AcquireLoadThread(base::subtle::Atomic32 *value) : value_(value) {}
- ~AcquireLoadThread() override {}
+ ~AcquireLoadThread() override = default;
void ThreadMain() override {
// Wait for the other thread to make Release_Store
PlatformThread::Sleep(TimeDelta::FromMilliseconds(100));