Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: base/pickle.cc

Issue 2797283002: Fixing std::swap(x, x) in base. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/pickle.cc
diff --git a/base/pickle.cc b/base/pickle.cc
index 02f39b57b7bb8133ad23501f2eb619117af2c0de..487a8cdf52d514d4c07da856369ac61bf9c527e6 100644
--- a/base/pickle.cc
+++ b/base/pickle.cc
@@ -307,10 +307,6 @@ Pickle::~Pickle() {
}
Pickle& Pickle::operator=(const Pickle& other) {
- if (this == &other) {
- NOTREACHED();
dcheng 2017/04/05 20:22:18 The post condition for CopyAssignment in N4618 [1]
dyaroshev 2017/04/05 20:42:47 This NOTREACHED mislead me - I read it as move ass
dcheng 2017/04/05 20:45:49 Dropping the NOTREACHED() seems fine, as long as k
dyaroshev 2017/04/05 20:54:17 Done.
- return *this;
- }
if (capacity_after_header_ == kCapacityReadOnly) {
header_ = NULL;
capacity_after_header_ = 0;

Powered by Google App Engine
This is Rietveld 408576698