diff --git a/api/reduce.C b/api/reduce.C index 6650929ec2..fe424bc9ce 100644 --- a/api/reduce.C +++ b/api/reduce.C @@ -141,10 +141,18 @@ void REDUCED_ARRAY::reduce_source_row(float* in, float* out) { out[ri] += in[i]; break; case REDUCE_METHOD_MIN: +#ifdef HAVE_STD_MIN + out[ri] = min(out[ri],in[i]); +#else out[ri] = std::min(out[ri],in[i]); +#endif break; case REDUCE_METHOD_MAX: +#ifdef HAVE_STD_MAX + out[ri] = max(out[ri],in[i]); +#else out[ri] = std::max(out[ri],in[i]); +#endif break; } } @@ -255,7 +263,11 @@ void REDUCED_ARRAY::draw_row_quad(int row) { y10 = draw_pos[1] + draw_size[1]*h10; y11 = draw_pos[1] + draw_size[1]*h11; +#ifdef HAVE_STD_MAX + float h = max(h00, max(h01, max(h10, h11))); +#else float h = std::max(h00, std::max(h01, std::max(h10, h11))); +#endif double hue = hue0 + (dhue*i)/rdimx; if (hue > 1) hue -= 1; double sat = 1.; diff --git a/checkin_notes b/checkin_notes index fedd1ffc26..5bee2b7ff4 100755 --- a/checkin_notes +++ b/checkin_notes @@ -20813,7 +20813,11 @@ Rom 6 Dec 2004 Bruce 7 Dec 2004 - Missing close bracket + - Use HAVE_STD_MIN and HAVE_STD_MAX to detect if std::min and std::max are needed. + Ron, please check and correct if needed -- build was broken under Linux. html/ ops/ db_update.php + api/ + reduce.C