Commit f7cf19e4caf990b468e043c1233b99046bfc5e70
1 parent
ebac75f2
fixed warnings, tested linux compatibility
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
stim/envi/envi.h
@@ -664,7 +664,7 @@ public: | @@ -664,7 +664,7 @@ public: | ||
664 | ((bsq<double>*)file)->bil(outfile, PROGRESS, OPTIMIZATION); | 664 | ((bsq<double>*)file)->bil(outfile, PROGRESS, OPTIMIZATION); |
665 | else if(interleave == envi_header::BIP){ //ERROR | 665 | else if(interleave == envi_header::BIP){ //ERROR |
666 | //std::cout<<"ERROR: conversion from BSQ to BIP isn't practical; use BSQ->BIL->BIP instead"<<std::endl; | 666 | //std::cout<<"ERROR: conversion from BSQ to BIP isn't practical; use BSQ->BIL->BIP instead"<<std::endl; |
667 | - ((bsq<float>*)file)->bip(outfile, PROGRESS, OPTIMIZATION); | 667 | + ((bsq<double>*)file)->bip(outfile, PROGRESS, OPTIMIZATION); |
668 | //exit(1); | 668 | //exit(1); |
669 | } | 669 | } |
670 | } | 670 | } |
stim/math/matrix.h
@@ -233,11 +233,11 @@ public: | @@ -233,11 +233,11 @@ public: | ||
233 | int r, c, ri, cia, cib; | 233 | int r, c, ri, cia, cib; |
234 | T a = 0; | 234 | T a = 0; |
235 | T b = 0; | 235 | T b = 0; |
236 | - for (c = 0; c < C; c++) { | 236 | + for (c = 0; c < (int)C; c++) { |
237 | for (r = 0; r < R; r++) { | 237 | for (r = 0; r < R; r++) { |
238 | ri = r; | 238 | ri = r; |
239 | - cia = (r + c) % C; | ||
240 | - cib = (C - 1 - r) % C; | 239 | + cia = (r + c) % (int)C; |
240 | + cib = ((int)C - 1 - r) % (int)C; | ||
241 | a += get(ri, cia); | 241 | a += get(ri, cia); |
242 | b += get(ri, cib); | 242 | b += get(ri, cib); |
243 | } | 243 | } |