boostorg / algorithm

Boost.org algorithm module
http://boost.org/libs/algorithm
Boost Software License 1.0
114 stars 105 forks source link

Fix MSVC warnings in tests #21

Closed MarcelRaad closed 1 year ago

MarcelRaad commented 8 years ago

MSVC complains about narrowing conversions and unreferences parameters. This makes all tests almost level 4 warning clean on MSVC 14.

MarcelRaad commented 1 year ago

Rebased and removed the two commits which are already integrated. Only the warning fixes are left now.

mclow commented 1 year ago

IIRC, the unsigned in hex is there to prevent warnings on other compilers.

mclow commented 1 year ago

In the testX checks, I'd rather change dest to a size_t, since that's what std::distance returns.

MarcelRaad commented 1 year ago

IIRC, the unsigned in hex is there to prevent warnings on other compilers.

OK, I reverted that one.

In the testX checks, I'd rather change dest to a size_t, since that's what std::distance returns.

Right, that's better! It's ptrdiff_t rather than size_t, but it also applies to the operator+ used in the other tests. I changed that now.