Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup bad ANDROIDLINT Automatic Fix (facebook#42694)
Summary: Pull Request resolved: facebook#42694 D53115471 commited all the automatically fixable lints by `ANDROIDLINT`. When I looked again, closer, there was one automatic fix that I'm fairly sure is incorrect. Before: `outTransform.postTranslate((int) (dx + 0.5f), (int) (dy + 0.5f));` After: `outTransform.postTranslate((dx + 0.5f), (dy + 0.5f));` I think the linter did this because the underlying API accepts a float, so this was (incorrectly) seen as an extraneous cast causing precision loss, but the previous behavior was using the cast and addition to round the float, instead of adding 0.5 to it. This replaces the call with an explicit rounding, for the same behavior as before (though, I'm not sure if the rounding is intentional, since in and out are both fp). Changelog: [Internal] Reviewed By: joevilches Differential Revision: D53158801 fbshipit-source-id: d268a5c429663dd7da0bfce2d717589986601196
- Loading branch information