On Wed, 2016-02-17 at 23:32 +0000, Matthew Brincke wrote: > the attached is for removing some duplications in PdfVariant > with the help of const_cast.
Hi, the "cast" from non-const to const does compiler for free. Using const_cast() only points to a wrong API design (if you work with a const object, but want to modify its content (state), then you shouldn't work with the const object at the first place). The 'const' is also a hint for the API user, that the function/pointer/whatever is meant for read-only purposes. That's at least my personal opinion on the const/non-const in general. Even you are right with the code duplication, it's nothing significant. And both are expanded inline, thus no big deal either. From my point of view. > Sorry that only build-tested it, I couldn't do tests > running code for security-policy reasons (my laptop is employer- > sponsored). I do not know details of your deal with your employer, but if you cannot run the code, you probably should also build it. Build scripts can run other scripts which can do "magics" with your machine. Security speaking. > So please run-test it if at all possible Ehm... Bye, zyx -- http://www.litePDF.cz i...@litepdf.cz ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users