Avoid -Wdouble-promotion warnings

This commit is contained in:
Paul Cornett
2020-10-14 11:07:55 -07:00
parent 97655e5b21
commit b5a554b9a6
44 changed files with 208 additions and 201 deletions

View File

@@ -2168,7 +2168,7 @@ bool wxDocPrintout::OnPrintPage(int WXUNUSED(page))
// but in fact is too small for some reason. This is a detail that will
// need to be addressed at some point but can be fudged for the
// moment.
float scale = (float)((float)ppiPrinterX/(float)ppiScreenX);
double scale = double(ppiPrinterX) / ppiScreenX;
// Now we have to check in case our real page size is reduced
// (e.g. because we're drawing to a print preview memory DC)
@@ -2180,7 +2180,7 @@ bool wxDocPrintout::OnPrintPage(int WXUNUSED(page))
// If printer pageWidth == current DC width, then this doesn't
// change. But w might be the preview bitmap width, so scale down.
float overallScale = scale * (float)(w/(float)pageWidth);
double overallScale = scale * w / pageWidth;
dc->SetUserScale(overallScale, overallScale);
if (m_printoutView)