Run clang-tidy modernize-use-equals-{delete,default} on //courgette
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: If5ff4c9b313efb82c9a53d2ea4540c5ef4a9abb0
Reviewed-on: https://chromium-review.googlesource.com/789721
Reviewed-by: Tommi <tommi@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Commit-Queue: Chris Watkins <watk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520412}
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index 1e60c65f..99c1103 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -427,7 +427,7 @@
// VS2005's implementation of std::set<T>::set() requires T to have a copy
// constructor.
// DISALLOW_COPY_AND_ASSIGN(Shingle);
- void operator=(const Shingle&); // Disallow assignment only.
+ void operator=(const Shingle&) = delete; // Disallow assignment only.
};
std::string ToString(const Shingle* instance) {
@@ -746,7 +746,7 @@
public:
typedef std::pair<int, LabelInfo*> ScoreAndLabel;
- VariableQueue() {}
+ VariableQueue() = default;
bool empty() const { return queue_.empty(); }
@@ -1225,7 +1225,7 @@
class Adjuster : public AdjustmentMethod {
public:
Adjuster() : prog_(NULL), model_(NULL) {}
- ~Adjuster() {}
+ ~Adjuster() = default;
bool Adjust(const AssemblyProgram& model, AssemblyProgram* program) {
VLOG(1) << "Adjuster::Adjust";