EFX: Add explicit cast to a square function
MSVC 2015 and above returns the expression according to its datatype. In this case, returns 4294967295 instead of -1.
This commit is contained in:
parent
d2608e4bde
commit
c5f88ab59f
@ -52,7 +52,7 @@ inline float Saw(ALuint index)
|
|||||||
{ return static_cast<float>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f; }
|
{ return static_cast<float>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f; }
|
||||||
|
|
||||||
inline float Square(ALuint index)
|
inline float Square(ALuint index)
|
||||||
{ return static_cast<float>(((index>>(WAVEFORM_FRACBITS-2))&2) - 1); }
|
{ return static_cast<float>(static_cast<int>((index>>(WAVEFORM_FRACBITS-2))&2) - 1); }
|
||||||
|
|
||||||
inline float One(ALuint) { return 1.0f; }
|
inline float One(ALuint) { return 1.0f; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user