warning fixes

This commit is contained in:
torsten 2009-08-20 11:53:58 +00:00 committed by Tim Moore
parent 71a4c2c3d2
commit 3ea58bf8db
2 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,7 @@ void CloudShaderGeometry::drawImplementation(RenderInfo& renderInfo) const
if (!sortData.spriteIdx)
sortData.spriteIdx = new SortData::SortItemList;
if (sortData.spriteIdx->size() < _cloudsprites.size()) {
for (int i = sortData.spriteIdx->size(); i < _cloudsprites.size(); ++i)
for (unsigned i = sortData.spriteIdx->size(); i < (unsigned)_cloudsprites.size(); ++i)
sortData.spriteIdx->push_back(SortData::SortItem(i, 0.0f));
sortData.frameSorted = frameNumber - (sortData.skip_limit + 1);
}

View File

@ -278,10 +278,12 @@ osg::Geometry* SGNewCloud::createOrthQuad(float w, float h, int varieties_x, int
return geom;
}
#if 0
// return a random number between -n/2 and n/2, tending to 0
static float Rnd(float n) {
return n * (-0.5f + (sg_random() + sg_random()) / 2.0f);
}
#endif
osg::ref_ptr<Geode> SGNewCloud::genCloud() {