0031004: Coding - eliminate warnings issued by gcc 9.1.0
[occt.git] / src / AdvApp2Var / AdvApp2Var_Network.hxx
index b651da2..e886107 100644 (file)
@@ -46,11 +46,8 @@ public:
   //! if all Patches are approximated Standard_False is returned
   Standard_EXPORT Standard_Boolean FirstNotApprox (Standard_Integer& Index) const;
   
   //! if all Patches are approximated Standard_False is returned
   Standard_EXPORT Standard_Boolean FirstNotApprox (Standard_Integer& Index) const;
   
-    AdvApp2Var_Patch& ChangePatch (const Standard_Integer Index);
-  AdvApp2Var_Patch& operator() (const Standard_Integer Index)
-{
-  return ChangePatch(Index);
-}
+  AdvApp2Var_Patch& ChangePatch (const Standard_Integer Index) { return *myNet.Value(Index); }
+  AdvApp2Var_Patch& operator()  (const Standard_Integer Index) { return ChangePatch(Index); }
   
   Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue);
   
   
   Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue);
   
@@ -67,38 +64,23 @@ public:
   Standard_EXPORT Standard_Real UParameter (const Standard_Integer Index) const;
   
   Standard_EXPORT Standard_Real VParameter (const Standard_Integer Index) const;
   Standard_EXPORT Standard_Real UParameter (const Standard_Integer Index) const;
   
   Standard_EXPORT Standard_Real VParameter (const Standard_Integer Index) const;
-  
-    const AdvApp2Var_Patch& Patch (const Standard_Integer UIndex, const Standard_Integer VIndex) const;
-  const AdvApp2Var_Patch& operator() (const Standard_Integer UIndex, const Standard_Integer VIndex) const
-{
-  return Patch(UIndex,VIndex);
-}
-
-
-
-
-protected:
-
-
 
 
+  const AdvApp2Var_Patch& Patch (const Standard_Integer UIndex, const Standard_Integer VIndex) const
+  {
+    return *myNet.Value ((VIndex-1)*(myUParameters.Length()-1) + UIndex);
+  }
 
 
+  const AdvApp2Var_Patch& operator() (const Standard_Integer UIndex, const Standard_Integer VIndex) const
+  {
+    return Patch(UIndex,VIndex);
+  }
 
 private:
 
 
 private:
 
-
-
   AdvApp2Var_SequenceOfPatch myNet;
   TColStd_SequenceOfReal myUParameters;
   TColStd_SequenceOfReal myVParameters;
 
   AdvApp2Var_SequenceOfPatch myNet;
   TColStd_SequenceOfReal myUParameters;
   TColStd_SequenceOfReal myVParameters;
 
-
 };
 
 };
 
-
-#include <AdvApp2Var_Network.lxx>
-
-
-
-
-
 #endif // _AdvApp2Var_Network_HeaderFile
 #endif // _AdvApp2Var_Network_HeaderFile