From 9cc773b5ad52460c1c63d52ee3d8c5a1bf8f77bb Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 24 Jul 2014 13:01:40 +0400 Subject: [PATCH] 0025090: Visualization - drop Graphic3d_Group::MyIsEmpty flag Small correction for issue CR25090 --- src/Graphic3d/Graphic3d_Group.cxx | 18 +++--------------- tests/bugs/modalg_5/bug24157_8 | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index bbc0022aa5..62a4dedc7a 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -29,7 +29,6 @@ #include #include -#define MyIsEmpty myCBitFields.bool1 #define MyContainsFacet myCBitFields.bool2 // ======================================================================= @@ -52,8 +51,7 @@ Graphic3d_Group::Graphic3d_Group (const Handle(Graphic3d_Structure)& theStruct) myStructure = theStruct.operator->(); - MyContainsFacet = Standard_False, - MyIsEmpty = Standard_True; + MyContainsFacet = Standard_False, ContextLine.IsDef = 0; ContextText.IsDef = 0; @@ -94,7 +92,6 @@ void Graphic3d_Group::Clear (Standard_Boolean theUpdateStructureMgr) myStructure->GroupsWithFacet (-1); MyContainsFacet = Standard_False; } - MyIsEmpty = Standard_True; // clear method could be used on Graphic3d_Structure destruction, // and its structure manager could be already destroyed, in that @@ -136,8 +133,6 @@ void Graphic3d_Group::Remove() Update(); myBounds.Clear(); - - MyIsEmpty = Standard_True; } // ======================================================================= @@ -170,12 +165,8 @@ Standard_Boolean Graphic3d_Group::IsEmpty() const return Standard_True; } - const Standard_Boolean isEmpty = myStructure->IsInfinite() ? Standard_False : !myBounds.IsValid(); - if (isEmpty != MyIsEmpty) - { - ::Message::DefaultMessenger()->Send ("Graphic3d_Group: MyIsEmpty != IsEmpty()", Message_Trace); - } - return isEmpty; + return !myStructure->IsInfinite() + && !myBounds.IsValid(); } // ======================================================================= @@ -1007,7 +998,6 @@ void Graphic3d_Group::AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray th MyContainsFacet = Standard_True; } - MyIsEmpty = Standard_False; if (theToEvalMinMax) { const Standard_Integer aNbVerts = theAttribs->NbElements; @@ -1083,7 +1073,6 @@ void Graphic3d_Group::UserDraw (const Standard_Address /*theObject*/, MyContainsFacet = Standard_True; } - MyIsEmpty = Standard_False; Update(); } @@ -1105,7 +1094,6 @@ void Graphic3d_Group::Text (const Standard_CString /*theText*/, return; } - MyIsEmpty = Standard_False; if (theToEvalMinMax) { Standard_ShortReal x, y, z; diff --git a/tests/bugs/modalg_5/bug24157_8 b/tests/bugs/modalg_5/bug24157_8 index b9d993f62b..81fcbfeba2 100644 --- a/tests/bugs/modalg_5/bug24157_8 +++ b/tests/bugs/modalg_5/bug24157_8 @@ -47,7 +47,7 @@ regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time if { [regexp {Debug mode} [dversion]] } { set check_time 25 } else { - set check_time 10 + set check_time 15 } if { $tps_time > $check_time } { puts "Error: low performance"