]> OCCT Git - occt-copy.git/commitdiff
0023729: Statement has no effect in BinMDataStd_NamedDataDriver::Paste()
authorkgv <kgv@opencascade.org>
Sat, 26 Jan 2013 19:49:45 +0000 (23:49 +0400)
committerkgv <kgv@opencascade.com>
Fri, 1 Feb 2013 11:44:28 +0000 (15:44 +0400)
src/BinMDataStd/BinMDataStd_NamedDataDriver.cxx

index 487128a3ff3b4749d7e98576fd9b963448b4c5fb..8c5c44718fd49c50cdcd25b7f1d520d7d22276ee 100755 (executable)
@@ -51,7 +51,7 @@ BinMDataStd_NamedDataDriver::BinMDataStd_NamedDataDriver(const Handle(CDM_Messag
 
 //=======================================================================
 //function : NewEmpty
-//purpose  : 
+//purpose  :
 //=======================================================================
 Handle(TDF_Attribute) BinMDataStd_NamedDataDriver::NewEmpty() const
 {
@@ -153,12 +153,12 @@ Standard_Boolean BinMDataStd_NamedDataDriver::Paste(const BinObjMgt_Persistent&
        Handle(TColStd_HArray1OfInteger) aTargetArray = new TColStd_HArray1OfInteger (low, up);
        if(!theSource.GetIntArray (&(aTargetArray->ChangeArray1())(low), up-low+1))
          return Standard_False;
-       
+
        Standard_Boolean Ok = anIntArrays.Bind(aKey, aTargetArray);
        aResult |= Ok;
       }
     }
-    if (aResult) 
+    if (aResult)
       T->ChangeArraysOfIntegers(anIntArrays);
   }
 
@@ -176,7 +176,8 @@ Standard_Boolean BinMDataStd_NamedDataDriver::Paste(const BinObjMgt_Persistent&
       Standard_Integer low, up;
       if (! (theSource >> low >> up))
         return Standard_False;
-      if(up < low) Standard_False;
+      if (up < low)
+        return Standard_False;
       if(low | up) {
         Handle(TColStd_HArray1OfReal) aTargetArray =
           new TColStd_HArray1OfReal(low, up);
@@ -203,7 +204,7 @@ void BinMDataStd_NamedDataDriver::Paste(const Handle(TDF_Attribute)& theSource,
   Handle(TDataStd_NamedData) S = Handle(TDataStd_NamedData)::DownCast (theSource);
   if(S.IsNull()) return;
 //  Standard_Integer i=0;
-  
+
   if(S->HasIntegers() && !S->GetIntegersContainer().IsEmpty()) {
     theTarget.PutInteger(1) << S->GetIntegersContainer().Extent(); //dim
     TColStd_DataMapIteratorOfDataMapOfStringInteger itr(S->GetIntegersContainer());
@@ -213,7 +214,7 @@ void BinMDataStd_NamedDataDriver::Paste(const Handle(TDF_Attribute)& theSource,
   } else {
     theTarget.PutInteger(0).PutInteger(0);
   }
-    
+
   if(S->HasReals() && !S->GetRealsContainer().IsEmpty()) {
     theTarget.PutInteger(1) << S->GetRealsContainer().Extent();
     TDataStd_DataMapIteratorOfDataMapOfStringReal itr(S->GetRealsContainer());