Index: chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc |
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc |
index 8ce3037417a41495500ebf94dc73402c0c069cdc..231a2fb2378c6df9fc48d74ff7ba492801678853 100644 |
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc |
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc |
@@ -79,17 +79,16 @@ SpellcheckHunspellDictionary::DictionaryFile::~DictionaryFile() { |
} |
} |
-SpellcheckHunspellDictionary::DictionaryFile::DictionaryFile(RValue other) |
- : path(other.object->path), |
- file(other.object->file.Pass()) { |
-} |
+SpellcheckHunspellDictionary::DictionaryFile::DictionaryFile( |
+ DictionaryFile&& other) |
+ : path(other.path), file(other.file.Pass()) {} |
SpellcheckHunspellDictionary::DictionaryFile& |
-SpellcheckHunspellDictionary::DictionaryFile::operator=(RValue other) { |
- if (this != other.object) { |
- path = other.object->path; |
- file = other.object->file.Pass(); |
- } |
+ SpellcheckHunspellDictionary::DictionaryFile:: |
+ operator=(DictionaryFile&& other) { |
+ DCHECK_NE(this, &other); |
danakj
2015/10/15 23:35:06
this looks non-destructive, can we remove the dche
dcheng
2015/10/16 00:40:01
file = other.file.Pass()
is destructive.
That be
danakj
2015/10/16 00:44:24
I think that's the right way to do it ya.
dcheng
2015/10/19 21:29:50
Done.
|
+ path = other.path; |
+ file = other.file.Pass(); |
return *this; |
} |