mirror of https://github.com/BOINC/boinc.git
Use HAVE_STD_MIN and HAVE_STD_MAX
svn path=/trunk/boinc/; revision=4777
This commit is contained in:
parent
44cef67242
commit
6a4bb3419b
12
api/reduce.C
12
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.;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue