0023560: Redundant copying in Geom_OffsetCurve::Geom_OffsetCurve constructor
authorabk <abk@opencascade.com>
Mon, 19 Nov 2012 07:47:45 +0000 (11:47 +0400)
committerabk <abk@opencascade.com>
Fri, 23 Nov 2012 11:50:56 +0000 (15:50 +0400)
Eliminating redundant copying of 'C' in Geom_OffsetCurve::Geom_OffsetCurve
  const Handle(Curve)& C,
  const Standard_Real Offset,
  const Dir & V) constructor was removed.

src/Geom/Geom_OffsetCurve.cxx

index 573f438..b9b821e 100755 (executable)
@@ -92,7 +92,7 @@ Geom_OffsetCurve::Geom_OffsetCurve (const Handle(Curve)& C,
  : direction(V), offsetValue(Offset) {
   
   if (C->DynamicType() == STANDARD_TYPE(Geom_OffsetCurve)) {
-    Handle(OffsetCurve) OC = Handle(OffsetCurve)::DownCast(C->Copy());
+    Handle(OffsetCurve) OC = Handle(OffsetCurve)::DownCast(C);
     if ((OC->BasisCurve())->Continuity() == GeomAbs_C0)  
       Standard_ConstructionError::Raise();