MSVC: conversions warnings in common code
|Reported by:||Templier||Owned by:||lordhoto|
I'm now compiling my engine (lastexpress) using MSVC with C4244 ('conversion' conversion from 'type1' to 'type2', possible loss of data) turned on and I've noticed a few warnings in headers included from common code. I'm opening this entry to track those cases.
Patch1: Cursor struct constructor using an int parameter to initialize a byte field: targetScale is defined as byte, but the constructor takes an int value. This changes the constructor to take a byte value for targetScale.
Patch2: Rect::clip taking int parameters while it's using int16 internally. This changes the clip method to take int16 values.
Ticket imported from: #2911414. Ticket imported from: patches/1227.