OCC22315 Correction of pure misprint in TDatsXtd & ViewerTest
authorSZY <>
Thu, 28 Apr 2011 15:22:18 +0000 (15:22 +0000)
committerbugmaster <bugmaster@opencascade.com>
Mon, 5 Mar 2012 15:27:57 +0000 (19:27 +0400)
src/TDataXtd/TDataXtd_Constraint.cxx
src/ViewerTest/ViewerTest.cxx

index 1f92d24..94b350e 100755 (executable)
@@ -216,7 +216,7 @@ const Handle(TNaming_NamedShape)&  TDataXtd_Constraint::GetPlane() const
 void TDataXtd_Constraint::SetType (const TDataXtd_ConstraintEnum CTR) 
 {  
   // OCC2932 correction
-  if(myType = CTR) return;
+  if(myType == CTR) return;
 
   Backup();
   myType = CTR;
index ba4e848..a2df927 100755 (executable)
@@ -1659,17 +1659,17 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
   if(myAISContext.IsNull())
     {
       di << "use 'vinit' command before " << argv[0] << "\n";
-      return 1;
+      return 0;
     }
 
   Handle(AIS_InteractiveObject) TheAisIO;
   Handle(AIS_TexturedShape) myShape;
   Standard_Integer myPreviousMode = 0;
 
-  if (argc<2 || !argv[1])
+  if (!argv[1])
     {
       di << argv[0] <<" syntax error - Type 'help vtex'"<<"\n";
-      return 1;
+      return 0;
     }
 
   TCollection_AsciiString name = argv[1];
@@ -1681,7 +1681,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
   if (TheAisIO.IsNull())
   {
     di <<"shape "<<name.ToCString()<<" doesn\'t exist"<<"\n";
-    return 1;
+    return 0;
   }
 
   if (TheAisIO->IsKind(STANDARD_TYPE(AIS_TexturedShape)) && !TheAisIO.IsNull())
@@ -1691,7 +1691,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
     }
   else
     {
-      myAISContext->Clear(TheAisIO,Standard_False);
+      myAISContext->Erase(TheAisIO,Standard_False);
       myShape = new AIS_TexturedShape (DBRep::Get(argv[1]));
       GetMapOfAIS().UnBind1(TheAisIO);
       GetMapOfAIS().UnBind2(name);
@@ -1703,9 +1703,9 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
       if(argc<=1)
        {
          di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
-         return 1;
+         return 0;
        }
-      if (argc>2 && argv[2])
+      if (argv[2])
        {
          if(strcasecmp(argv[2],"?")==0)
            {
@@ -1744,7 +1744,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
       if(argc<2)
        {
          di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
-         return 1;
+         return 0;
        }
 
       myShape->SetTextureScale (( argv[2] ? Standard_True    : Standard_False ),
@@ -1756,7 +1756,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
       if(argc<2)
        {
          di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
-         return 1;
+         return 0;
        }
       myShape->SetTextureOrigin (( argv[2] ? Standard_True    : Standard_False ),
                                 ( argv[2] ? atof(argv[2])    : 0.0 ),
@@ -1767,9 +1767,9 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
       if(argc<2)
        {
          di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
-         return 1;
+         return 0;
        }
-      if (argc>2 && argv[2])
+      if (argv[2])
        {
          di <<"Texture repeat enabled"<<"\n";
          myShape->SetTextureRepeat(Standard_True, atof(argv[2]), atof(argv[argc-1]) );
@@ -1789,7 +1789,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
       if(argc<2)
        {
          di << argv[0] <<" syntax error - Type 'help vtex'" << "\n";
-         return 1;
+         return 0;
        }
       myShape->SetTextureRepeat(Standard_False);
       myShape->SetTextureOrigin(Standard_False);
@@ -1805,7 +1805,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
       myAISContext->Display(myShape, Standard_True);
       myAISContext->Update(myShape,Standard_True);
     }
-  return 0;
+  return 1;
 }
 
 //==============================================================================
@@ -2066,7 +2066,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
 // Function : VAnimation
 //==================================================================================
 static int VAnimation (Draw_Interpretor& di, Standard_Integer argc, const char** argv) {
-  if (argc =! 5) {
+  if (argc != 5) {
     di<<"Use: "<<argv[0]<<" CrankArmFile CylinderHeadFile PropellerFile EngineBlockFile"<<"\n";
     return 1;
   }
@@ -2580,7 +2580,7 @@ Standard_Boolean  ViewerTest::PickObjects(Handle(TColStd_HArray1OfTransient)& ar
   Standard_Integer curindex = (TheType == AIS_KOI_None) ? 0 : TheAISContext()->OpenLocalContext();
 
   // step 1: prepare the data
-  if(curindex !=0){
+  if(curindex != 0){
     Handle(AIS_SignatureFilter) F1 = new AIS_SignatureFilter(TheType,TheSignature);
     TheAISContext()->AddFilter(F1);
   }
@@ -2639,7 +2639,7 @@ Handle(AIS_InteractiveObject) ViewerTest::PickObject(const AIS_KindOfInteractive
 
   // step 1: prepare the data
 
-  if(curindex !=0){
+  if(curindex != 0){
     Handle(AIS_SignatureFilter) F1 = new AIS_SignatureFilter(TheType,TheSignature);
     TheAISContext()->AddFilter(F1);
   }
@@ -2666,7 +2666,7 @@ Handle(AIS_InteractiveObject) ViewerTest::PickObject(const AIS_KindOfInteractive
     IO = TheAISContext()->SelectedInteractive();
   }
 
-  if(curindex!=0)
+  if(curindex != 0)
     TheAISContext()->CloseLocalContext(curindex);
   return IO;
 }
@@ -3079,7 +3079,7 @@ static int VIOTypes( Draw_Interpretor& di, Standard_Integer , const char** )
 
 static int VEraseType( Draw_Interpretor& , Standard_Integer argc, const char** argv)
 {
-  if(argc!=2) return 1;
+  if(argc != 2) return 1;
 
   AIS_KindOfInteractive TheType;
   Standard_Integer TheSign(-1);