- cleanup a bunch of vc++ compile / link warnings

This commit is contained in:
Mark Vejvoda
2013-02-01 08:12:20 +00:00
parent d808b4ecc4
commit bff9b1b3bc
9 changed files with 51 additions and 9 deletions

View File

@@ -158,7 +158,11 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
FileReader<T> const * reader = *i;
ret = reader->read(file, filepath); //It is guaranteed that at least the filepath matches ...
}
#if defined(WIN32)
catch (megaglest_runtime_error) {
#else
catch (megaglest_runtime_error &ex) {
#endif
throw;
}
catch (...) {
@@ -206,7 +210,11 @@ static inline T* readFromFileReaders(vector<FileReader<T> const *>* readers, con
FileReader<T> const * reader = *i;
ret = reader->read(file, filepath, object); //It is guaranteed that at least the filepath matches ...
}
#if defined(WIN32)
catch (megaglest_runtime_error) {
#else
catch (megaglest_runtime_error &ex) {
#endif
throw;
}
catch (...) {
@@ -329,7 +337,11 @@ bool FileReader<T>::canRead(ifstream& file) const {
delete wouldRead;
return ret;
}
#if defined(WIN32)
catch (megaglest_runtime_error) {
#else
catch (megaglest_runtime_error &ex) {
#endif
throw;
}
catch (...) {

View File

@@ -82,7 +82,7 @@ Pixmap2D* JPGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const
is.read((char*)buffer, (std::streamsize)length);
static bool bigEndianSystem = Shared::PlatformByteOrder::isBigEndian();
if(bigEndianSystem == true) {
Shared::PlatformByteOrder::fromEndianTypeArray<uint8>(buffer,length);
Shared::PlatformByteOrder::fromEndianTypeArray<uint8>(buffer,(size_t)length);
}
//Check buffer (weak jpeg check)
//if (buffer[0] != 0x46 || buffer[1] != 0xA0) {