From 063f9bbc4dbf3f23f3bb1b010d5b81ac2c646b11 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 28 Apr 2016 16:14:44 -0700 Subject: [PATCH] minor compilation issues --- panda/src/express/zStreamBuf.cxx | 4 ++-- panda/src/grutil/shaderTerrainMesh.cxx | 2 +- panda/src/movies/dr_flac.h | 6 +----- panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/panda/src/express/zStreamBuf.cxx b/panda/src/express/zStreamBuf.cxx index e6f45ce76c..c16caf8211 100644 --- a/panda/src/express/zStreamBuf.cxx +++ b/panda/src/express/zStreamBuf.cxx @@ -178,7 +178,7 @@ streampos ZStreamBuf:: seekoff(streamoff off, ios_seekdir dir, ios_openmode which) { // Necessary for tellg() to work after seeking to 0. if (dir == ios::cur && off == 0) { - if (_source->tellg() == 0) { + if (_source->tellg() == (streampos)0) { return 0; } else { return -1; @@ -199,7 +199,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) { gbump(n); _source->seekg(0, ios::beg); - if (_source->tellg() == 0) { + if (_source->tellg() == (streampos)0) { _z_source.next_in = Z_NULL; _z_source.avail_in = 0; _z_source.next_out = Z_NULL; diff --git a/panda/src/grutil/shaderTerrainMesh.cxx b/panda/src/grutil/shaderTerrainMesh.cxx index 9523b093bf..b92b37de84 100644 --- a/panda/src/grutil/shaderTerrainMesh.cxx +++ b/panda/src/grutil/shaderTerrainMesh.cxx @@ -386,7 +386,7 @@ void ShaderTerrainMesh::do_create_chunk_geom() { vtx_pos.set_x(max(0.0f, min(1.0f, vtx_pos.get_x()))); vtx_pos.set_y(max(0.0f, min(1.0f, vtx_pos.get_y()))); } - vertex_writer.add_data3f(vtx_pos); + vertex_writer.add_data3(vtx_pos); } } diff --git a/panda/src/movies/dr_flac.h b/panda/src/movies/dr_flac.h index ff9960df5b..d5eefcf5d8 100644 --- a/panda/src/movies/dr_flac.h +++ b/panda/src/movies/dr_flac.h @@ -332,11 +332,7 @@ static drflac* drflac_open_memory(const void* data, size_t dataSize); #include #endif -#ifdef _MSC_VER -#define DRFLAC_INLINE __forceinline -#else -#define DRFLAC_INLINE inline -#endif +#define DRFLAC_INLINE ALWAYS_INLINE #define DRFLAC_BLOCK_TYPE_STREAMINFO 0 #define DRFLAC_BLOCK_TYPE_PADDING 1 diff --git a/panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx b/panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx index 2d05be4fda..2c8932f7c9 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx @@ -276,7 +276,7 @@ read_pfm(PfmFile &pfm) { // Reposition the file at the beginning. _file->seekg(0, ios::beg); - if (_file->tellg() != 0) { + if (_file->tellg() != (streampos)0) { pnmimage_cat.error() << "Could not reposition file pointer to the beginning.\n"; return false; @@ -427,7 +427,7 @@ int StbImageReader:: read_data(xel *array, xelval *alpha) { // Reposition the file at the beginning. _file->seekg(0, ios::beg); - if (_file->tellg() != 0) { + if (_file->tellg() != (streampos)0) { pnmimage_cat.error() << "Could not reposition file pointer to the beginning.\n"; return 0;