mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.53k stars 342 forks source link

fix: narrowing conversion in util::compare tests #3342

Open pbrit opened 3 days ago

pbrit commented 3 days ago

You can see what I had while compiling on linux-aarch64 (Dev Container on MacOS) in the screenshot.

clangd suggests to add static_cast<int>, but I decided against it since char shall not be used with negative values. I'm not 100% certain about that for char and negatives are a bit of a tricky thing in the standard.

How do you feel about that change? @JohanMabille @Hind-M

Screenshot 2024-07-04 at 4 10 29 PM