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

Unified Diff: sync/syncable/directory.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: sync/syncable/directory.cc
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index b6d314364fd0f3bb11a6e48557dfda6853d8cf7c..ca1efc1c95bda86f708e288e667e15b106d39b25 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -9,6 +9,7 @@
#include <algorithm>
#include <iterator>
+#include <utility>
#include "base/base64.h"
#include "base/guid.h"
@@ -1157,7 +1158,7 @@ std::unique_ptr<base::ListValue> Directory::GetNodeDetailsForType(
node->SetInteger("positionIndex", GetPositionIndex(trans, kernel));
}
- nodes->Append(node.release());
+ nodes->Append(std::move(node));
}
return nodes;

Powered by Google App Engine
This is Rietveld 408576698