I'm getting the "ambiguous call" compilation error for this:
short i;
MyFunc(i+1, i+1);
Where there are two definitions for MyFunc - one taking two shorts, the other taking two floats.
When I write:
MyFunc(i, i+1);
There's no error - the compiler deduces short.
My question is, how come 'short' + 1 may result as a floating point, and how can I avoid going over all my code and adding explicit casts such as:
MyFunc((short)(i+1), (short)(i+1));
Thanks.