mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Coding - Reorganize code with constexpr #68
After rework Precision.hxx some local variables can be marked as constexpr
This commit is contained in:
@@ -273,7 +273,7 @@ VrmlData_ErrorStatus VrmlData_Material::Write (const char * thePrefix) const
|
||||
char buf[128];
|
||||
Standard_Real val[3];
|
||||
const Quantity_TypeOfColor bidType = Quantity_TOC_sRGB;
|
||||
const Standard_Real aConf (0.001 * Precision::Confusion());
|
||||
constexpr Standard_Real aConf (0.001 * Precision::Confusion());
|
||||
|
||||
if (OK(aStatus) && fabs(myAmbientIntensity - 0.2) > aConf) {
|
||||
Sprintf (buf, "%.6g", myAmbientIntensity);
|
||||
@@ -324,7 +324,7 @@ VrmlData_ErrorStatus VrmlData_Material::Write (const char * thePrefix) const
|
||||
|
||||
Standard_Boolean VrmlData_Material::IsDefault () const
|
||||
{
|
||||
const Standard_Real aConf (0.001 * Precision::Confusion());
|
||||
constexpr Standard_Real aConf (0.001 * Precision::Confusion());
|
||||
Standard_Boolean aResult (Standard_False);
|
||||
if (fabs(myAmbientIntensity - 0.2) < aConf &&
|
||||
fabs(myShininess - 0.2) < aConf &&
|
||||
|
@@ -414,7 +414,7 @@ Handle(VrmlData_Geometry) VrmlData_ShapeConvert::triToIndexedFaceSet
|
||||
Poly_Connect PC(theTri);
|
||||
// Create the Normals node (if UV- values are available)
|
||||
TopLoc_Location aLoc;
|
||||
const Standard_Real aConf2 = Precision::SquareConfusion();
|
||||
constexpr Standard_Real aConf2 = Precision::SquareConfusion();
|
||||
const Handle(Geom_Surface) aSurface = BRep_Tool::Surface (theFace, aLoc);
|
||||
if (theTri->HasUVNodes() && aSurface.IsNull() == Standard_False)
|
||||
{
|
||||
|
Reference in New Issue
Block a user