Salome HOME
Fix regressions of tests
[modules/smesh.git] / src / SMDS / SMDS_ElementFactory.hxx
index b25b635c8af09718731fc1d08cfece7a4f9d1c2c..18c3d9461dbccbb79e893ee88fa71916b6d3938e 100644 (file)
@@ -266,8 +266,13 @@ struct _RangeSet
    */
   attr_t SetValue( int theIndex, attr_t theValue )
   {
-    set_iterator rNext = mySet.upper_bound( theIndex );
+    set_iterator rNext = mySet.end(); // case of adding elements
     set_iterator     r = rNext - 1;
+    if ( r->my1st > theIndex )
+    {
+      rNext = mySet.upper_bound( theIndex );
+      r     = rNext - 1;
+    }
     int          rSize = Size( r ); // range size
     attr_t      rValue = r->myValue;
     if ( rValue == theValue )
@@ -347,7 +352,8 @@ typedef _Range< bool > _UsedRange;    // range of used elements
 typedef _RangeSet< _ShapeIDRange > TSubIDRangeSet;
 typedef _RangeSet< _UsedRange >    TUsedRangeSet;
 typedef boost::dynamic_bitset<>    TBitSet;
-typedef float                       TParam;
+//typedef float                       TParam;
+typedef double                     TParam;
 
 //------------------------------------------------------------------------------------
 /*!