From 54f2672f6a599bcec8ad6eb11ac8c01a073cfacd Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 17 Oct 2014 21:16:35 +0400 Subject: [PATCH 1/1] 22787: [CEA 1320] Regression of test $SMESH_ROOT_DIR/bin/salome/SMESH_reg.py Add namespace StdMeshers to StdMeshers_Distribution.* in order to avoid clashing with FunctionExpr from paraview-4.2/libvtkvisitcommon-pv4.2.so.1 --- src/StdMeshers/StdMeshers_CartesianParameters3D.cxx | 2 +- src/StdMeshers/StdMeshers_Distribution.cxx | 3 +++ src/StdMeshers/StdMeshers_Distribution.hxx | 5 +++-- src/StdMeshers/StdMeshers_NumberOfSegments.cxx | 1 + src/StdMeshers/StdMeshers_Regular_1D.cxx | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx b/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx index 0b7ac0235..b2e15df8c 100644 --- a/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx +++ b/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx @@ -329,7 +329,7 @@ void StdMeshers_CartesianParameters3D::ComputeCoordinates(const double x0, coords.clear(); for ( size_t i = 0; i < spaceFuns.size(); ++i ) { - FunctionExpr fun( spaceFuns[i].c_str(), /*convMode=*/-1 ); + StdMeshers::FunctionExpr fun( spaceFuns[i].c_str(), /*convMode=*/-1 ); const double p0 = x0 * ( 1. - points[i]) + x1 * points[i]; const double p1 = x0 * ( 1. - points[i+1]) + x1 * points[i+1]; diff --git a/src/StdMeshers/StdMeshers_Distribution.cxx b/src/StdMeshers/StdMeshers_Distribution.cxx index aa7ebf1f5..3a0a7334b 100644 --- a/src/StdMeshers/StdMeshers_Distribution.cxx +++ b/src/StdMeshers/StdMeshers_Distribution.cxx @@ -43,6 +43,8 @@ using namespace std; +namespace StdMeshers { + Function::Function( const int conv ) : myConv( conv ) { @@ -345,3 +347,4 @@ bool buildDistribution( const Function& func, const double start, const double e data[nbSeg] = end; return true; } +} diff --git a/src/StdMeshers/StdMeshers_Distribution.hxx b/src/StdMeshers/StdMeshers_Distribution.hxx index d5744d2da..e974e95f7 100644 --- a/src/StdMeshers/StdMeshers_Distribution.hxx +++ b/src/StdMeshers/StdMeshers_Distribution.hxx @@ -37,7 +37,8 @@ #include #include - +namespace StdMeshers +{ class STDMESHERS_EXPORT Function { public: @@ -114,5 +115,5 @@ bool buildDistribution( const TCollection_AsciiString& f, const int conv, const STDMESHERS_EXPORT bool buildDistribution( const std::vector& f, const int conv, const double start, const double end, const int nbSeg, std::vector& data, const double eps ); - +} #endif diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index f09dc7a10..c9e48b7e2 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -53,6 +53,7 @@ #include +using namespace StdMeshers; using namespace std; const double PRECISION = 1e-7; diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index cc964cfac..a7e67cfeb 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -68,6 +68,7 @@ #include using namespace std; +using namespace StdMeshers; //============================================================================= /*! -- 2.30.2