Inside my code I am typecasting a variable before I return it (C++).
Is it safe to do so, or should I typecast first and then return the value?
Currently :
return NumericType (r_endoftheScale);
Or should I change it to
NumericType r_endoftheScale;
r_endoftheScale=NumericType (w_endoftheScale);
return r_endoftheScale;
The two variants are equivalent and interchangeable.