Page MenuHome

Use explicit two's complement for MSVC in find_first_set()
ClosedPublic

Authored by Leszek Godlewski (inequation) on Nov 25 2022, 6:25 PM.

Details

Summary

Compiling Cycles in Visual Studio 2022 yields the error:

cycles\src\util\math.h(865,52): error C4146: unary minus operator applied to unsigned type, result still unsigned

Replacing it with explicit two's complement achieves the same result as signed negation but avoids the error.

Diff Detail

Repository
rC Cycles