Salome HOME
0020511: EDF 1101 SMESH : Add CGNS to Mesh Format Supported
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.cxx
index f2ce323edcedaecfb4e68a5890da0a6edb7b40c8..8dd7ca4f03ac19d7e9c3be2f18b1227ef9be39ce 100644 (file)
@@ -604,7 +604,11 @@ SMESH::Histogram* NumericalFunctor_i::GetHistogram(CORBA::Short nbIntervals)
   std::vector<int> elements;
   myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements);
 
+#ifdef WIN32
+  nbIntervals = CORBA::Short( min( nbEvents.size(), funValues.size() - 1));
+#else
   nbIntervals = CORBA::Short( std::min( nbEvents.size(), funValues.size() - 1));
+#endif
   SMESH::Histogram_var histogram = new SMESH::Histogram;
   if ( nbIntervals > 0 )
   {
@@ -3770,6 +3774,7 @@ static const char** getFunctNames()
   static const char* functName[ SMESH::FT_Undefined + 1 ] = {
     // If this line doesn't compile, this means that enum FunctorType has changed and
     // it's necessary to update this array accordingly (refer to SMESH_Filter.idl)
+    // The order is IMPORTANT !!!
     "FT_AspectRatio", "FT_AspectRatio3D", "FT_Warping", "FT_MinimumAngle",
     "FT_Taper", "FT_Skew", "FT_Area", "FT_Volume3D", "FT_MaxElementLength2D",
     "FT_MaxElementLength3D", "FT_FreeBorders", "FT_FreeEdges", "FT_FreeNodes",
@@ -3792,7 +3797,7 @@ static const char** getFunctNames()
 const char* SMESH::FunctorTypeToString(SMESH::FunctorType ft)
 {
   if ( ft < 0 || ft > SMESH::FT_Undefined )
-    return 0;
+    return "FT_Undefined";
   return getFunctNames()[ ft ];
 }