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

Unified Diff: chrome/renderer/spellchecker/hunspell_engine.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: chrome/renderer/spellchecker/hunspell_engine.cc
diff --git a/chrome/renderer/spellchecker/hunspell_engine.cc b/chrome/renderer/spellchecker/hunspell_engine.cc
index 8cfbde39e67d576be7264e846902bd99b88ceb0a..9ce91b2338d2b760699b65699f2bf708615c8d80 100644
--- a/chrome/renderer/spellchecker/hunspell_engine.cc
+++ b/chrome/renderer/spellchecker/hunspell_engine.cc
@@ -5,9 +5,9 @@
#include "chrome/renderer/spellchecker/hunspell_engine.h"
#include <stddef.h>
-
#include <algorithm>
#include <iterator>
+#include <utility>
#include "base/files/memory_mapped_file.h"
#include "base/time/time.h"
@@ -53,7 +53,7 @@ void HunspellEngine::Init(base::File file) {
initialized_ = true;
hunspell_.reset();
bdict_file_.reset();
- file_ = file.Pass();
+ file_ = std::move(file);
hunspell_enabled_ = file_.IsValid();
// Delay the actual initialization of hunspell until it is needed.
}
@@ -64,7 +64,7 @@ void HunspellEngine::InitializeHunspell() {
bdict_file_.reset(new base::MemoryMappedFile);
- if (bdict_file_->Initialize(file_.Pass())) {
+ if (bdict_file_->Initialize(std::move(file_))) {
hunspell_.reset(new Hunspell(bdict_file_->data(), bdict_file_->length()));
} else {
NOTREACHED() << "Could not mmap spellchecker dictionary.";

Powered by Google App Engine
This is Rietveld 408576698