mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 15:30:41 +00:00
clean up math varsize complaints
This commit is contained in:
parent
1230d0d280
commit
0ce2da3a23
30 changed files with 61 additions and 56 deletions
|
|
@ -849,10 +849,10 @@ inline ColorI LinearColorF::toColorI(const bool keepAsLinear)
|
|||
float b = mPow(blue, gOneOverGamma);
|
||||
return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5));
|
||||
#else
|
||||
float r = red < 0.0031308f ? 12.92f * red : 1.055 * mPow(red, 1.0f / 2.4f) - 0.055f;
|
||||
float g = green < 0.0031308f ? 12.92f * green : 1.055 * mPow(green, 1.0f / 2.4f) - 0.055f;
|
||||
float b = blue < 0.0031308f ? 12.92f * blue : 1.055 * mPow(blue, 1.0f / 2.4f) - 0.055f;
|
||||
return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5));
|
||||
float r = red < 0.0031308f ? 12.92f * red : 1.055f * mPow(red, 1.0f / 2.4f) - 0.055f;
|
||||
float g = green < 0.0031308f ? 12.92f * green : 1.055f * mPow(green, 1.0f / 2.4f) - 0.055f;
|
||||
float b = blue < 0.0031308f ? 12.92f * blue : 1.055f * mPow(blue, 1.0f / 2.4f) - 0.055f;
|
||||
return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5f));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ char* dStristr( char* str1, const char* str2 )
|
|||
|
||||
// Slow but at least we have it.
|
||||
|
||||
U32 str2len = strlen( str2 );
|
||||
U64 str2len = (U64)strlen( str2 );
|
||||
while( *str1 )
|
||||
{
|
||||
if( strncasecmp( str1, str2, str2len ) == 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue