From d8ac5b68b504536136347547816992b1cf605cd4 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 08 Nov 2002 15:20:59 +0000 Subject: - a couple of fixes like this one: - fprintf(f, "%g", real); + fprintf(f, "%g", static_cast(real)); with 'real' being a fouble object. as fprintf is a c function with variable arguments one cannot pass non-primitive objects through it and there is no way for the compiler to figure out the right conversion operator, so we give it a helping hand :) --- (limited to 'noncore') diff --git a/noncore/unsupported/qpdf/xpdf/Gfx.cc b/noncore/unsupported/qpdf/xpdf/Gfx.cc index 17d613e..f016c0e 100644 --- a/noncore/unsupported/qpdf/xpdf/Gfx.cc +++ b/noncore/unsupported/qpdf/xpdf/Gfx.cc @@ -1864,7 +1864,7 @@ void Gfx::opSetFont(Object args[], int numArgs) { printf(" font: tag=%s name='%s' %g\n", font->getTag()->getCString(), font->getName() ? font->getName()->getCString() : "???", - args[1].getNum()); + static_cast(args[1].getNum())); fflush(stdout); } state->setFont(font, args[1].getNum()); diff --git a/noncore/unsupported/qpdf/xpdf/Object.cc b/noncore/unsupported/qpdf/xpdf/Object.cc index 6d92c6a..77f1317 100644 --- a/noncore/unsupported/qpdf/xpdf/Object.cc +++ b/noncore/unsupported/qpdf/xpdf/Object.cc @@ -149,7 +149,7 @@ void Object::print(FILE *f) { fprintf(f, "%d", intg); break; case objReal: - fprintf(f, "%g", real); + fprintf(f, "%g", static_cast(real)); break; case objString: fprintf(f, "("); diff --git a/noncore/unsupported/qpdf/xpdf/Page.cc b/noncore/unsupported/qpdf/xpdf/Page.cc index 9cc08c4..aead7da 100644 --- a/noncore/unsupported/qpdf/xpdf/Page.cc +++ b/noncore/unsupported/qpdf/xpdf/Page.cc @@ -230,10 +230,10 @@ void Page::display(OutputDev *out, fouble dpi, int rotate, if (printCommands) { printf("***** MediaBox = ll:%g,%g ur:%g,%g\n", - box->x1, box->y1, box->x2, box->y2); + static_cast(box->x1), static_cast(box->y1), static_cast(box->x2), static_cast(box->y2)); if (isCropped()) { printf("***** CropBox = ll:%g,%g ur:%g,%g\n", - cropBox->x1, cropBox->y1, cropBox->x2, cropBox->y2); + static_cast(cropBox->x1), static_cast(cropBox->y1), static_cast(cropBox->x2), static_cast(cropBox->y2)); } printf("***** Rotate = %d\n", attrs->getRotate()); } -- cgit v0.9.0.2