0030554: Coding - ChFiDS_CommonPoint uninitialized member traarc
[occt.git] / src / ChFiDS / ChFiDS_CommonPoint.cxx
old mode 100755 (executable)
new mode 100644 (file)
index a2e921c..754fb26
@@ -1,21 +1,40 @@
-// File:       ChFiDS_CommonPoint.cxx
-// Created:    Tue Nov 30 17:48:00 1993
-// Author:     Isabelle GRIGNON
-//             <isg@zerox>
-
-
-#include <ChFiDS_CommonPoint.ixx>
+// Created on: 1993-11-30
+// Created by: Isabelle GRIGNON
+// Copyright (c) 1993-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+
+#include <ChFiDS_CommonPoint.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
+#include <Standard_DomainError.hxx>
+#include <Standard_TypeMismatch.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Vertex.hxx>
 
 //=======================================================================
 //function : ChFiDS_CommonPoint
 //purpose  : 
 //=======================================================================
-
-ChFiDS_CommonPoint::ChFiDS_CommonPoint() : 
-tol(0.),
-isonarc(Standard_False),
-isvtx(Standard_False),
-hasvector(Standard_False)
+ChFiDS_CommonPoint::ChFiDS_CommonPoint()
+: tol (0.0),
+  prmarc (0.0),
+  prmtg  (0.0),
+  traarc (TopAbs_FORWARD),
+  isonarc(Standard_False),
+  isvtx (Standard_False),
+  hasvector (Standard_False)
 {
 }
 
@@ -70,7 +89,7 @@ void  ChFiDS_CommonPoint::SetParameter(const Standard_Real Param)
 const TopoDS_Edge&  ChFiDS_CommonPoint::Arc()const 
 {
   if (!isonarc){
-    Standard_DomainError::Raise("CommonPoint not on Arc"); 
+    throw Standard_DomainError("CommonPoint not on Arc");
   }
   return arc;
 }
@@ -84,7 +103,7 @@ const TopoDS_Edge&  ChFiDS_CommonPoint::Arc()const
 TopAbs_Orientation  ChFiDS_CommonPoint::TransitionOnArc()const 
 {
   if (!isonarc){
-    Standard_DomainError::Raise("CommonPoint not on Arc"); 
+    throw Standard_DomainError("CommonPoint not on Arc");
   }
   return traarc;
 }
@@ -98,7 +117,7 @@ TopAbs_Orientation  ChFiDS_CommonPoint::TransitionOnArc()const
 Standard_Real  ChFiDS_CommonPoint::ParameterOnArc()const 
 {
   if (!isonarc){
-    Standard_DomainError::Raise("CommonPoint not on Arc"); 
+    throw Standard_DomainError("CommonPoint not on Arc");
   }
   return prmarc;
 }