- mostly about return type conversions.
void removeChild(BVHNode* child);
unsigned getNumChildren() const
- { return _children.size(); }
+ { return static_cast<unsigned>(_children.size()); }
const BVHNode* getChild(unsigned i) const
{ if (_children.size() <= i) return 0; return _children[i]; }
BVHNode* getChild(unsigned i)
virtual ~BVHStaticData() {}
unsigned addVertex(const SGVec3f& vertex)
- { _vertices.push_back(vertex); return _vertices.size() - 1; }
+ { _vertices.push_back(vertex); return static_cast<unsigned>(_vertices.size() - 1); }
const SGVec3f& getVertex(unsigned i) const
{ return _vertices[i]; }
unsigned addMaterial(const BVHMaterial* material)
- { _materials.push_back(material); return _materials.size() - 1; }
+ { _materials.push_back(material); return static_cast<unsigned>(_materials.size() - 1); }
const BVHMaterial* getMaterial(unsigned i) const
{ if (_materials.size() <= i) return 0; return _materials[i]; }
bool load( const SGPath& path );
// stars
- inline int getNumStars() const { return _stars.size(); }
+ inline int getNumStars() const { return static_cast<int>(_stars.size()); }
inline SGVec3d *getStars() { return &(_stars[0]); }
private:
static bool isNaN(const T& v)
{
#ifdef HAVE_ISNAN
- return isnan(v);
+ return (isnan(v) != 0);
#elif defined HAVE_STD_ISNAN
return std::isnan(v);
#else