RetroAchievements / rcheevos

Library to parse and evaluate achievements and leaderboards for RetroAchievements
MIT License
86 stars 33 forks source link

prevent warning comparing floats to integer constants #323

Closed Jamiras closed 5 months ago

Jamiras commented 6 months ago

https://discord.com/channels/310192285306454017/1149693430306447380/1215563178209968139

The logical construct "float(0x1234) >= 0" should not generate a warning indicating it is always true because floats can be negative. This was correctly handled for "float(0x1234) >= 0.0"

I've also modified the warning for things like "byte(0x1234) >= 0.1" so it doesn't return "comparison is always true" as well.