On Tuesday, September 20, 2011 4:35 PM, Jeffrey Walton wrote:
> On Tue, Sep 20, 2011 at 5:13 PM, Bollinger, John C
> <john.bollin...@stjude.org> wrote:

[...]

> > The most obvious fix would be to change the CInts to CReals, but
> I don't know whether that would cause trouble elsewhere in the
> program.CInt (static_cast<int>(image_size.x))
> CInt (static_cast<int>(image_size.x)) and CInt
> (static_cast<int>(image_size.y)) ? Otherwise, you might need to
> change
> Tp to float or double (which seems like a lot more work).
>
> Since PDFs are widely abused as vectors (and it is CentOS), you
> might
> want to verify image_size.x and image_size.y are within bounds of
> the
> [integer] data type if you choose to cast. numeric_limits is your
> friend.

Thanks, Jeff.

Changing Tp to double is approximately the effect of switching the types from 
CInt to CReal.  Only the lines I showed need to be modified, and the code then 
compiles fine without any more warnings in that section.  The problem is that 
I'm not sure how to test adequately whether the resulting program works 
correctly.

static_cast might do the job, but storing a reference to the result of a cast 
sounds dubious to me.  It might work, but it seems like asking for trouble.  
Again, though, I'm not sure how to test the result adequately.

Is there any clear guidance on what this ought to be, or is guess and test the 
best available approach?


Thanks again,

John


Email Disclaimer:  www.stjude.org/emaildisclaimer


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Pdfedit-support mailing list
Pdfedit-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdfedit-support

Reply via email to