File 0001-Add-explicit-namespace-std-for-cout-and-endl.patch of Package cgx

From adf3d15f2a62014e5bfa885c5bbc72bb1be3994a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sun, 28 Jul 2019 05:04:16 +0200
Subject: [PATCH] Add explicit namespace std for cout and endl

---
 src/uselibSNL.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/uselibSNL.cpp b/src/uselibSNL.cpp
index a7a0c21..801bb1e 100644
--- a/src/uselibSNL.cpp
+++ b/src/uselibSNL.cpp
@@ -528,7 +528,7 @@ inline void calculateBSpline(double * pnt, BSplineCurve * myCurve,double u)
 /**************************************************/
 void piaFitting(double pCloud [][3],int nPnt,BSplineCurve * fitCurve, int deg, double tolerance)
 {
-  if(nPnt<2) cout<<"WARNING: too few Points"<<endl;
+  if(nPnt<2) std::cout<<"WARNING: too few Points"<<std::endl;
   fitCurve->k = NULL;fitCurve->cX = NULL;fitCurve->cY = NULL;fitCurve->cZ = NULL;fitCurve->w = NULL;
   int nCPnt = nPnt + 2, i;  
   if((fitCurve->k = (double *)realloc((double *)fitCurve->k,(nPnt+2*deg)*sizeof(double))) == NULL )
@@ -621,12 +621,12 @@ void piaFitting(double pCloud [][3],int nPnt,BSplineCurve * fitCurve, int deg, d
       c++;
     }
     #if PLOT == 1
-    cout<<"Error: "<<error<<" after "<<iter<<"-iterations"<<endl;
+    std::cout<<"Error: "<<error<<" after "<<iter<<"-iterations"<<std::endl;
     #endif
     iter++;
   }while(sqrt((error-errorOld)*(error-errorOld))>dist*tolerance);
-  cout<<"BSpline fitting ... done"<<endl;
-  cout<<"Error: "<<error<<" after "<<iter<<"-iterations"<<endl;
+  std::cout<<"BSpline fitting ... done"<<std::endl;
+  std::cout<<"Error: "<<error<<" after "<<iter<<"-iterations"<<std::endl;
 }
 
 
-- 
2.22.0

openSUSE Build Service is sponsored by