[Insight-developers] STYLE: Un-necessary use of static_cast -- should we care?

Sean McBride sean at rogue-research.com
Mon Jul 23 17:11:13 EDT 2012


On Mon, 23 Jul 2012 20:42:25 +0000, Williams, Norman K said:

>So the question is this: do we keep static_cast where they aren't needed?

My 2¢: I think that kind of unnecessary cast is a code smell, and would remove it.

>and should we add dynamic_cast in the frequent case where an input or
>output of a filter is assumed to be of a particular type?

Perhaps in a debug-only assert()?

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list