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

Unified Diff: printing/emf_win_unittest.cc

Issue 374443003: clang/win: Fix "taking the address of a temporary" error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/emf_win_unittest.cc
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc
index c9600ed82476e432eecd466f11d86a866131e6bc..8a5daaff4ef064d40fb1bf64978bf5df1ca92fc8 100644
--- a/printing/emf_win_unittest.cc
+++ b/printing/emf_win_unittest.cc
@@ -106,8 +106,8 @@ TEST_F(EmfPrintingTest, Enumerate) {
context->NewDocument(L"EmfTest.Enumerate");
context->NewPage();
// Process one at a time.
- Emf::Enumerator emf_enum(emf, context->context(),
- &emf.GetPageBounds(1).ToRECT());
+ RECT page_bounds = emf.GetPageBounds(1).ToRECT();
+ Emf::Enumerator emf_enum(emf, context->context(), &page_bounds);
for (Emf::Enumerator::const_iterator itr = emf_enum.begin();
itr != emf_enum.end();
++itr) {
@@ -161,7 +161,7 @@ TEST_F(EmfPrintingTest, PageBreak) {
// Since presumably the printer is not real, let us just delete the job from
// the queue.
HANDLE printer = NULL;
- if (::OpenPrinter(L"UnitTest Printer", &printer, NULL)) {
+ if (::OpenPrinter(const_cast<LPTSTR>(L"UnitTest Printer"), &printer, NULL)) {
::SetJob(printer, job_id, 0, NULL, JOB_CONTROL_DELETE);
ClosePrinter(printer);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698