Use HAVE_STD_MIN and HAVE_STD_MAX

svn path=/trunk/boinc/; revision=4777
This commit is contained in:
Bruce Allen 2004-12-07 11:16:45 +00:00
parent 44cef67242
commit 6a4bb3419b
2 changed files with 16 additions and 0 deletions

View File

@ -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.;

View File

@ -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