Closed dpronin closed 9 months ago
Does FPC give an error on that line in case there is no cast to Integer?
If yes, then it would be very inconvinient to always do such a cast when use this and similar methods. There is no point in overriden method names in that case, better to use a separate method name instead, smth like GetLengthI
f.e.
Despite there are 3 methods defined in KromUtils unit and all of them are marked with overload on Linux platform with FPC-3.2.2 + Lazarus-3.0 the compiler is confused which one should be selected to call
Functions look like
function GetLength(ix,iy,iz: single): single; overload;
function GetLength(ix,iy: single): single; overload;
function GetLength(ix,iy: integer): single; overload;
I suspect that types single and integer compete and conflict
I think that I could introduce GetLengthI with concrete types (Integer), as you have offered, that would call GetLength with integer parameters. If it fails I will bring the algorithm out from GetLength to GetLengthI and call GetLengthI from GetLength
@reyandme done
Thank you
fix ambiguous call of GetLength in TKMTerrainPainter.ApplyHeight