Index: sync/engine/commit_processor.cc |
diff --git a/sync/engine/commit_processor.cc b/sync/engine/commit_processor.cc |
index a5149acdb4e258e7f9aa55e3534885674ee2b499..2dcf590332a81667a26b9e3b2178871029297dd5 100644 |
--- a/sync/engine/commit_processor.cc |
+++ b/sync/engine/commit_processor.cc |
@@ -5,6 +5,7 @@ |
#include "sync/engine/commit_processor.h" |
#include <map> |
+#include <utility> |
#include "sync/engine/commit_contribution.h" |
#include "sync/engine/commit_contributor.h" |
@@ -39,7 +40,8 @@ void CommitProcessor::GatherCommitContributions( |
cm_it->second->GetContribution(spaces_remaining); |
if (contribution) { |
num_entries += contribution->GetNumEntries(); |
- contributions->insert(it.Get(), contribution.Pass()); |
+ DCHECK(!contributions->count(it.Get())); |
+ (*contributions)[it.Get()] = std::move(contribution); |
Nico
2015/12/01 01:02:16
Should there be a comment here saying that this us
danakj
2015/12/01 01:03:12
Oh, or maybe we don't need to do this and can inse
vmpstr
2015/12/01 01:03:58
Oh this was just me applying the latest patchset,
|
} |
if (num_entries >= max_entries) { |
DCHECK_EQ(num_entries, max_entries) |