Remove a lot of static_cast<>s involving UI structs.

Also starting to get religion on using unsigned integers only when I want their wrapping/modulus behavior.
This commit is contained in:
Jared Boone 2016-11-29 10:13:56 -08:00
parent 4c8550bb7d
commit 3f94591083
11 changed files with 28 additions and 76 deletions

View file

@ -73,10 +73,7 @@ ui::Point Calibration::translate(const DigitizerPoint& p) const {
const int32_t y = (d * p.x + e * p.y + f) / k;
const auto x_clipped = x_range.clip(x);
const auto y_clipped = y_range.clip(y);
return {
static_cast<ui::Coord>(x_clipped),
static_cast<ui::Coord>(y_clipped)
};
return { x_clipped, y_clipped };
}
const Calibration default_calibration() {