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

Unified Diff: chrome/browser/printing/pdf_to_emf_converter.cc

Issue 1407443002: Remove old C++03 move emulation code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: std::move and reflow Created 5 years, 1 month 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
« no previous file with comments | « base/win/scoped_handle.h ('k') | chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/pdf_to_emf_converter.cc
diff --git a/chrome/browser/printing/pdf_to_emf_converter.cc b/chrome/browser/printing/pdf_to_emf_converter.cc
index e07bf6ab9ff43d9b9efb2feab03f7f3e36e1d37d..071327ef4a03f202a913ce45a110763d386417e3 100644
--- a/chrome/browser/printing/pdf_to_emf_converter.cc
+++ b/chrome/browser/printing/pdf_to_emf_converter.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/printing/pdf_to_emf_converter.h"
#include <queue>
+#include <utility>
#include "base/files/file.h"
#include "base/files/file_util.h"
@@ -113,21 +114,21 @@ class PdfToEmfUtilityProcessHostClient
private:
class GetPageCallbackData {
- MOVE_ONLY_TYPE_FOR_CPP_03(GetPageCallbackData, RValue);
+ MOVE_ONLY_TYPE_FOR_CPP_03(GetPageCallbackData);
public:
GetPageCallbackData(int page_number,
PdfToEmfConverter::GetPageCallback callback)
: page_number_(page_number), callback_(callback) {}
- // Move constructor for STL.
- GetPageCallbackData(RValue other) { this->operator=(other); }
+ GetPageCallbackData(GetPageCallbackData&& other) {
+ *this = std::move(other);
+ }
- // Move assignment for STL.
- GetPageCallbackData& operator=(RValue rhs) {
- page_number_ = rhs.object->page_number_;
- callback_ = rhs.object->callback_;
- emf_ = rhs.object->emf_.Pass();
+ GetPageCallbackData& operator=(GetPageCallbackData&& rhs) {
+ page_number_ = rhs.page_number_;
+ callback_ = rhs.callback_;
+ emf_ = std::move(rhs.emf_);
return *this;
}
« no previous file with comments | « base/win/scoped_handle.h ('k') | chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698