Made the values signed ints, as otherwise the casting was doing something strange on 64-bit systems.

This commit is contained in:
David Williams 2015-04-01 16:29:19 +02:00
parent 5d220c5d57
commit 65f39e7b57

View File

@ -39,9 +39,9 @@ freely, subject to the following restrictions:
namespace PolyVox namespace PolyVox
{ {
static const std::array<uint32_t, 32> deltaX = { 1, 7, 1, 55, 1, 7, 1, 439, 1, 7, 1, 55, 1, 7, 1, 3511, 1, 7, 1, 55, 1, 7, 1, 439, 1, 7, 1, 55, 1, 7, 1 }; static const std::array<int32_t, 32> deltaX = { 1, 7, 1, 55, 1, 7, 1, 439, 1, 7, 1, 55, 1, 7, 1, 3511, 1, 7, 1, 55, 1, 7, 1, 439, 1, 7, 1, 55, 1, 7, 1 };
static const std::array<uint32_t, 32> deltaY = { 2, 14, 2, 110, 2, 14, 2, 878, 2, 14, 2, 110, 2, 14, 2, 7022, 2, 14, 2, 110, 2, 14, 2, 878, 2, 14, 2, 110, 2, 14, 2 }; static const std::array<int32_t, 32> deltaY = { 2, 14, 2, 110, 2, 14, 2, 878, 2, 14, 2, 110, 2, 14, 2, 7022, 2, 14, 2, 110, 2, 14, 2, 878, 2, 14, 2, 110, 2, 14, 2 };
static const std::array<uint32_t, 32> deltaZ = { 4, 28, 4, 220, 4, 28, 4, 1756, 4, 28, 4, 220, 4, 28, 4, 14044, 4, 28, 4, 220, 4, 28, 4, 1756, 4, 28, 4, 220, 4, 28, 4 }; static const std::array<int32_t, 32> deltaZ = { 4, 28, 4, 220, 4, 28, 4, 1756, 4, 28, 4, 220, 4, 28, 4, 14044, 4, 28, 4, 220, 4, 28, 4, 1756, 4, 28, 4, 220, 4, 28, 4 };
template <typename VoxelType> template <typename VoxelType>
PagedVolume<VoxelType>::Sampler::Sampler(PagedVolume<VoxelType>* volume) PagedVolume<VoxelType>::Sampler::Sampler(PagedVolume<VoxelType>* volume)