unicenta-pos
unicenta-pos copied to clipboard
Potential fix for code scanning alert no. 1: Implicit narrowing conversion in compound assignment
Potential fix for https://github.com/poolborges/unicenta-pos/security/code-scanning/1
To fix the problem, we need to ensure that the type of the left-hand side of the compound assignment is at least as wide as the type of the right-hand side. In this case, we should change the type of left from float to double to match the type returned by getWidth(). This will prevent any implicit narrowing conversion and preserve the precision of the calculation.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.