Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stupid change to avoid compiler warning
**Warning** ``` Warning C4244 'initializing': conversion from '_Ty' to '_Ty2', possible loss of data with [ _Ty=int ] and [ _Ty2=VM::u8 ] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\utility 247 ``` **Explanation** The warning suggests that converting between these types (i.e., from DWORD to u8) may cause data loss since DWORD is 32-bit and u8 is only 8-bit. **Solution** All the values you're assigning to the u8 type are valid and will fit within uint8_t. Therefore, casting them as static_cast<u8> will work fine to supress the MSVC compiler warning without any data loss: - The first value, 6, is well within the range of uint8_t (0-255). - The rest of the values (7, 8, 10, 11) also fit within the valid range of uint8_t. By explictly casting the values to "u8" (which is an alias for uint8_t) during initialization, we make it clear that we're aware of the conversion to the compiler.
- Loading branch information