1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0023560: Redundant copying in Geom_OffsetCurve::Geom_OffsetCurve constructor

Eliminating redundant copying of 'C' in Geom_OffsetCurve::Geom_OffsetCurve
  const Handle(Curve)& C,
  const Standard_Real Offset,
  const Dir & V) constructor was removed.
This commit is contained in:
abk 2012-11-19 11:47:45 +04:00
parent e9c15c4cec
commit b9e76f0570

View File

@ -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();