If joyGetNumDevs() > INT_MAX, casting it to an 'int' leads to undefined behavior. On the other hand, after the 'ident >= 0' test succeeded, it is perfectly safe to use static_cast<unsigned int>(ident), since 'ident' is of type 'int'. Then we get to compare two unsigned ints, which is well defined. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
js.cxx | ||
js.h | ||
jsBSD.cxx | ||
jsLinux.cxx | ||
jsMacOSX.cxx | ||
jsNone.cxx | ||
jsWindows.cxx |