From 369df86096aa1ecfde85b4e7e8dbb18ed4f8932b Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 29 Apr 2016 19:17:47 +0200 Subject: [PATCH] Fix a compile issue or two --- .travis.yml | 8 +++++--- makepanda/makepanda.py | 8 ++++++-- panda/src/grutil/shaderTerrainMesh.cxx | 4 ++-- panda/src/movies/dr_flac.h | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index e0bb8ccc85..6c6a399e23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,11 @@ sudo: false matrix: include: - compiler: gcc - env: PYTHONV=python2.7 + env: PYTHONV=python2.7 FLAGS= - compiler: clang - env: PYTHONV=python3 + env: PYTHONV=python3 FLAGS=--installer + - compiler: clang + env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1 addons: apt: packages: @@ -26,7 +28,7 @@ addons: - python-dev - python3-dev - zlib1g-dev -script: $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT --installer --threads 4 && LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py +script: $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT $FLAGS --threads 4 && LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py notifications: irc: channels: diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 3550774149..58cc4071ba 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -592,8 +592,12 @@ if (COMPILER == "MSVC"): if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib") if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib") if (PkgSkip("OPENSSL")==0): - LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib") - LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib") + if os.path.isfile(GetThirdpartyDir() + "openssl/lib/libpandassl.lib"): + LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib") + LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib") + else: + LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libeay32.lib") + LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/ssleay32.lib") if (PkgSkip("PNG")==0): if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"): LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib") diff --git a/panda/src/grutil/shaderTerrainMesh.cxx b/panda/src/grutil/shaderTerrainMesh.cxx index b92b37de84..c8e247e24e 100644 --- a/panda/src/grutil/shaderTerrainMesh.cxx +++ b/panda/src/grutil/shaderTerrainMesh.cxx @@ -383,8 +383,8 @@ void ShaderTerrainMesh::do_create_chunk_geom() { // Stitched vertices at the cornders if (x == -1 || y == -1 || x == size + 1 || y == size + 1) { vtx_pos.set_z(-1.0f / (PN_stdfloat)size); - 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()))); + vtx_pos.set_x(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_x()))); + vtx_pos.set_y(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_y()))); } vertex_writer.add_data3(vtx_pos); } diff --git a/panda/src/movies/dr_flac.h b/panda/src/movies/dr_flac.h index d5eefcf5d8..c6da7b9004 100644 --- a/panda/src/movies/dr_flac.h +++ b/panda/src/movies/dr_flac.h @@ -92,7 +92,7 @@ #include #include -#include +//#include // As data is read from the client it is placed into an internal buffer for fast access. This controls the // size of that buffer. Larger values means more speed, but also more memory. In my testing there is diminishing @@ -2244,7 +2244,7 @@ done_reading_block_header: } if (pIsLastBlockOut) { - *pIsLastBlockOut = isLastBlock; + *pIsLastBlockOut = (isLastBlock != 0); } return blockType; @@ -2350,7 +2350,7 @@ static bool drflac__seek_to_sample__brute_force(drflac* pFlac, uint64_t sampleIn return false; } - return drflac_read_s16(pFlac, samplesToDecode, NULL); + return (drflac_read_s16(pFlac, samplesToDecode, NULL) != 0); } static bool drflac__seek_to_sample__seek_table(drflac* pFlac, uint64_t sampleIndex)