GCC fixes

This commit is contained in:
David Williams 2014-09-21 23:07:14 +02:00
parent db2e62d2a8
commit 75df6621bd
2 changed files with 230 additions and 230 deletions

View File

@ -353,9 +353,9 @@ namespace PolyVox
Pager* m_pPager;
// Enough to make sure a chunks and it's neighbours can be loaded, with a few to spare.
static const uint32_t uMinPracticalNoOfChunks = 32;
const uint32_t uMinPracticalNoOfChunks = 32;
// Should prevent multi-gigabyte volumes when chunk sizes are reasonable.
static const uint32_t uMaxPracticalNoOfChunks = 32768;
const uint32_t uMaxPracticalNoOfChunks = 32768;
};
}

View File

@ -101,7 +101,7 @@ VolumeType* createAndFillVolume(void)
{
const int32_t uVolumeSideLength = 64;
FilePager<VolumeType::VoxelType>* pager = new FilePager<VolumeType::VoxelType>(".");
FilePager<typename VolumeType::VoxelType>* pager = new FilePager<typename VolumeType::VoxelType>(".");
//Create empty volume
VolumeType* volData = new VolumeType(Region(Vector3DInt32(0, 0, 0), Vector3DInt32(uVolumeSideLength - 1, uVolumeSideLength - 1, uVolumeSideLength - 1)), pager);
@ -115,9 +115,9 @@ VolumeType* createAndFillVolume(void)
{
// Create a density field which changes throughout the volume. It's
// zero in the lower corner and increasing as the coordinates increase.
VolumeType::VoxelType voxelValue;
writeDensityValueToVoxel<VolumeType::VoxelType>(x + y + z, voxelValue);
writeMaterialValueToVoxel<VolumeType::VoxelType>(z > uVolumeSideLength / 2 ? 42 : 79, voxelValue);
typename VolumeType::VoxelType voxelValue;
writeDensityValueToVoxel<typename VolumeType::VoxelType>(x + y + z, voxelValue);
writeMaterialValueToVoxel<typename VolumeType::VoxelType>(z > uVolumeSideLength / 2 ? 42 : 79, voxelValue);
volData->setVoxelAt(x, y, z, voxelValue);
}
}