GCC fixes

This commit is contained in:
David Williams 2011-09-05 21:44:02 +01:00
parent b84147f650
commit 0c97756a0c
7 changed files with 10 additions and 6 deletions

View File

@ -30,6 +30,7 @@ freely, subject to the following restrictions:
#include "PolyVoxCore/Array.h"
#include <list>
#include <stdexcept> //For runtime_error
namespace PolyVox
{

View File

@ -163,7 +163,7 @@ namespace PolyVox
#if defined(_MSC_VER)
class Sampler : public Volume<VoxelType>::Sampler< LargeVolume<VoxelType> > //This line works on VS2010
#else
class Sampler : public Volume<VoxelType>::Sampler Nested< LargeVolume<VoxelType> > //This line works on GCC
class Sampler : public Volume<VoxelType>::template Sampler< LargeVolume<VoxelType> > //This line works on GCC
#endif
{
public:

View File

@ -259,9 +259,9 @@ namespace PolyVox
bool MeshDecimator<VertexType>::collapseChangesFaceNormals(uint32_t uSrc, uint32_t uDst, float fThreshold)
{
bool faceFlipped = false;
vector<uint32_t>& triangles = trianglesUsingVertex[uSrc];
std::vector<uint32_t>& triangles = trianglesUsingVertex[uSrc];
for(vector<uint32_t>::iterator triIter = triangles.begin(); triIter != triangles.end(); triIter++)
for(std::vector<uint32_t>::iterator triIter = triangles.begin(); triIter != triangles.end(); triIter++)
{
uint32_t tri = *triIter;

View File

@ -52,7 +52,7 @@ namespace PolyVox
#if defined(_MSC_VER)
class Sampler : public Volume<VoxelType>::Sampler< RawVolume<VoxelType> > //This line works on VS2010
#else
class Sampler : public Volume<VoxelType>::Sampler Nested< RawVolume<VoxelType> > //This line works on GCC
class Sampler : public Volume<VoxelType>::template Sampler< RawVolume<VoxelType> > //This line works on GCC
#endif
{
public:

View File

@ -77,7 +77,7 @@ namespace PolyVox
#if defined(_MSC_VER)
class Sampler : public Volume<VoxelType>::Sampler< SimpleVolume<VoxelType> > //This line works on VS2010
#else
class Sampler : public Volume<VoxelType>::Sampler Nested< SimpleVolume<VoxelType> > //This line works on GCC
class Sampler : public Volume<VoxelType>::template Sampler< SimpleVolume<VoxelType> > //This line works on GCC
#endif
{
public:

View File

@ -24,6 +24,8 @@ freely, subject to the following restrictions:
#ifndef __PolyVox_VolumeResampler_H__
#define __PolyVox_VolumeResampler_H__
#include <cmath>
namespace PolyVox
{
template< template<typename> class SrcVolumeType, template<typename> class DestVolumeType, typename VoxelType>

View File

@ -119,7 +119,8 @@ namespace PolyVox
uint8_t voxel110Den = voxel110.getDensity();
uint8_t voxel111Den = voxel111.getDensity();
float dummy;
//FIXME - should accept all float parameters, but GCC complains?
double dummy;
sx = modf(sx, &dummy);
sy = modf(sy, &dummy);
sz = modf(sz, &dummy);