mirror of
https://github.com/blender/blender
synced 2026-10-25 03:07:01 +03:00
There are two things achieved by this change: - No possible downcast of size_t to int when calculating motion steps. - Disambiguate call to `min()` which was for some reason considered ambiguous on 32bit platforms `min(int, unsigned int)`. - Do the same for the `max()` call to keep them symmetrical. On an implementation side the `min()` is defined for a fixed width integer type to disambiguate uint from size_t on 32bit platforms, and yet be able to use it for 32bit operands on 64bit platforms without upcast. This ended up in a bit bigger change as the conditional compile-in of functions is easiest if the functions is templated. Making the functions templated required to remove the other source of ambiguity which is `algorithm.h` which was pulling min/max from std. Now it is the `math.h` which is the source of truth for min/max. It was only one place which was relying on `algorithm.h` for these functions, hence the choice of `math.h` as the safest and least intrusive. Fixes 32bit platforms (such as i386) in Debian package build system. Differential Revision: https://developer.blender.org/D14062 |
||
|---|---|---|
| .. | ||
| binning.cpp | ||
| binning.h | ||
| build.cpp | ||
| build.h | ||
| bvh.cpp | ||
| bvh.h | ||
| bvh2.cpp | ||
| bvh2.h | ||
| CMakeLists.txt | ||
| embree.cpp | ||
| embree.h | ||
| metal.h | ||
| metal.mm | ||
| multi.cpp | ||
| multi.h | ||
| node.cpp | ||
| node.h | ||
| optix.cpp | ||
| optix.h | ||
| params.h | ||
| sort.cpp | ||
| sort.h | ||
| split.cpp | ||
| split.h | ||
| unaligned.cpp | ||
| unaligned.h | ||