Fix a compile issue or two

This commit is contained in:
rdb 2016-04-29 19:17:47 +02:00
parent dc09e28ed9
commit 369df86096
4 changed files with 16 additions and 10 deletions

View File

@ -3,9 +3,11 @@ sudo: false
matrix: matrix:
include: include:
- compiler: gcc - compiler: gcc
env: PYTHONV=python2.7 env: PYTHONV=python2.7 FLAGS=
- compiler: clang - compiler: clang
env: PYTHONV=python3 env: PYTHONV=python3 FLAGS=--installer
- compiler: clang
env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1
addons: addons:
apt: apt:
packages: packages:
@ -26,7 +28,7 @@ addons:
- python-dev - python-dev
- python3-dev - python3-dev
- zlib1g-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: notifications:
irc: irc:
channels: channels:

View File

@ -592,8 +592,12 @@ if (COMPILER == "MSVC"):
if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib") if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib")
if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib") if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib")
if (PkgSkip("OPENSSL")==0): if (PkgSkip("OPENSSL")==0):
LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib") if os.path.isfile(GetThirdpartyDir() + "openssl/lib/libpandassl.lib"):
LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.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 (PkgSkip("PNG")==0):
if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"): if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"):
LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib") LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib")

View File

@ -383,8 +383,8 @@ void ShaderTerrainMesh::do_create_chunk_geom() {
// Stitched vertices at the cornders // Stitched vertices at the cornders
if (x == -1 || y == -1 || x == size + 1 || y == size + 1) { if (x == -1 || y == -1 || x == size + 1 || y == size + 1) {
vtx_pos.set_z(-1.0f / (PN_stdfloat)size); 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_x(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_x())));
vtx_pos.set_y(max(0.0f, min(1.0f, vtx_pos.get_y()))); vtx_pos.set_y(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_y())));
} }
vertex_writer.add_data3(vtx_pos); vertex_writer.add_data3(vtx_pos);
} }

View File

@ -92,7 +92,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> //#include <stdbool.h>
// As data is read from the client it is placed into an internal buffer for fast access. This controls the // 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 // 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) { if (pIsLastBlockOut) {
*pIsLastBlockOut = isLastBlock; *pIsLastBlockOut = (isLastBlock != 0);
} }
return blockType; return blockType;
@ -2350,7 +2350,7 @@ static bool drflac__seek_to_sample__brute_force(drflac* pFlac, uint64_t sampleIn
return false; 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) static bool drflac__seek_to_sample__seek_table(drflac* pFlac, uint64_t sampleIndex)