diff --git a/api/graphics_data.C b/api/graphics_data.C index a5dbd0e9e2..6f3548a82b 100644 --- a/api/graphics_data.C +++ b/api/graphics_data.C @@ -30,8 +30,8 @@ GRAPHICS_BUFFER* GRAPHICS_DOUBLE_BUFFER::get_render_buffer() { b->state = GB_STATE_RENDERING; } } else { - b->state = GB_STATE_RENDERING; - } + b->state = GB_STATE_RENDERING; + } } return b; } diff --git a/api/reduce.cpp b/api/reduce.cpp index 2cf1728449..926e49e079 100644 --- a/api/reduce.cpp +++ b/api/reduce.cpp @@ -1,8 +1,17 @@ -#include #include #include #include + +#ifdef _WIN32 +#include #include +#endif + +#ifdef __APPLE_CC__ +#include +#define max(a,b) (a>b?a:b) +#define min(a,b) (a>b?b:a) +#endif #include "gutil.h" #include "reduce.h" @@ -11,7 +20,7 @@ REDUCED_ARRAY::REDUCED_ARRAY() { rdata = 0; ftemp = 0; itemp = 0; - reduce_method = REDUCE_METHOD_AVG; + reduce_method = REDUCE_METHOD_AVG; } REDUCED_ARRAY::~REDUCED_ARRAY() { @@ -55,7 +64,7 @@ void REDUCED_ARRAY::init(int sx, int sy) { last_ry = 0; last_ry_count = 0; rdata_max = 0; - rdata_min = (float)1e20; + rdata_min = (float)1e20; } bool REDUCED_ARRAY::full() { @@ -77,7 +86,7 @@ void REDUCED_ARRAY::init_draw(float* p, float* s, double h0, double dh, float tr draw_deltaz = draw_size[2]/rdimy; hue0 = h0; dhue = dh; - alpha = trans; + alpha = trans; } // reduce a single row. This is called only if sdimx > rdimx; @@ -89,27 +98,27 @@ void REDUCED_ARRAY::reduce_source_row(float* in, float* out) { memset(itemp, 0, rdimx*sizeof(int)); for (i=0; i 1) out[i] /= itemp[i]; } - } + } } void REDUCED_ARRAY::update_max(int row) {