Commit cac62fd30760d9565a5d535df09b514997fe53e1

Authored by David Mayerich
1 parent f6169dea

modified to work on GCC

Showing 3 changed files with 8 additions and 7 deletions   Show diff stats
@@ -350,7 +350,7 @@ public: @@ -350,7 +350,7 @@ public:
350 target.write(reinterpret_cast<const char*>(p), S); //write a band data into target file 350 target.write(reinterpret_cast<const char*>(p), S); //write a band data into target file
351 } 351 }
352 352
353 - header.interleave = rts::envi::interleaveType::BSQ; //change the type of file in header file 353 + header.interleave = rts::envi::BSQ; //change the type of file in header file
354 header.save(headername); 354 header.save(headername);
355 355
356 free(p); 356 free(p);
@@ -384,7 +384,7 @@ public: @@ -384,7 +384,7 @@ public:
384 target.write(reinterpret_cast<const char*>(q), S); //write a band data into target file 384 target.write(reinterpret_cast<const char*>(q), S); //write a band data into target file
385 } 385 }
386 386
387 - header.interleave = rts::envi::interleaveType::BIP; //change the type of file in header file 387 + header.interleave = rts::envi::BIP; //change the type of file in header file
388 header.save(headername); 388 header.save(headername);
389 389
390 free(p); 390 free(p);
@@ -400,4 +400,4 @@ public: @@ -400,4 +400,4 @@ public:
400 } 400 }
401 401
402 }; 402 };
403 -}  
404 \ No newline at end of file 403 \ No newline at end of file
  404 +}
1 #include "../envi/envi.h" 1 #include "../envi/envi.h"
2 #include "../envi/binary.h" 2 #include "../envi/binary.h"
  3 +#include "../envi/bil.h"
3 #include <cstring> 4 #include <cstring>
4 #include <utility> 5 #include <utility>
5 6
@@ -291,7 +292,7 @@ public: @@ -291,7 +292,7 @@ public:
291 } 292 }
292 target.write(reinterpret_cast<const char*>(p), L); //write XZ slice data into target file 293 target.write(reinterpret_cast<const char*>(p), L); //write XZ slice data into target file
293 } 294 }
294 - header.interleave = rts::envi::interleaveType::BIL; //change the type of file in header file 295 + header.interleave = rts::envi::BIL; //change the type of file in header file
295 header.save(headername); 296 header.save(headername);
296 297
297 free(p); 298 free(p);
@@ -313,12 +313,12 @@ namespace stim{ @@ -313,12 +313,12 @@ namespace stim{
313 313
314 int index(std::string _name) 314 int index(std::string _name)
315 { 315 {
316 - int i = find(args.begin(), args.end(), _name) - args.begin(); 316 + unsigned int i = find(args.begin(), args.end(), _name) - args.begin();
317 317
318 if(i >= args.size()) 318 if(i >= args.size())
319 - i = -1; 319 + return -1;
320 320
321 - return i; 321 + return (int)i;
322 } 322 }
323 323
324 void set(std::string _name, std::string _value) 324 void set(std::string _name, std::string _value)