mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0023433: Compiler warnings in Graphic3d_ArrayOfPrimitives.lxx
Conversion of color components from real [0,1] to char [0,255] corrected to avoid compiler warnings
This commit is contained in:
parent
cdc56cc8ae
commit
a180e3849f
@ -98,9 +98,9 @@ inline void Graphic3d_ArrayOfPrimitives::SetVertexColor(
|
||||
}
|
||||
|
||||
if( myPrimitiveArray->vcolours ) {
|
||||
unsigned char red = (unsigned int)(R * 255.);
|
||||
unsigned char green = (unsigned int)(G * 255.);
|
||||
unsigned char blue = (unsigned int)(B * 255.);
|
||||
unsigned char red = (unsigned char)(R <= 0. ? 0. : R >= 1. ? 255. : R * 255.);
|
||||
unsigned char green = (unsigned char)(G <= 0. ? 0. : G >= 1. ? 255. : G * 255.);
|
||||
unsigned char blue = (unsigned char)(B <= 0. ? 0. : B >= 1. ? 255. : B * 255.);
|
||||
unsigned char alpha = 0;
|
||||
Standard_Integer outColor ;
|
||||
outColor = red;
|
||||
|
Loading…
x
Reference in New Issue
Block a user