From Jean-Sebastien Guay, Warning fixes

This commit is contained in:
Robert Osfield 2008-01-08 17:18:11 +00:00
parent d7d1b382b7
commit 6ca573dfd3
2 changed files with 10 additions and 11 deletions

View File

@ -167,9 +167,8 @@ public:
osg::Plane _plane; osg::Plane _plane;
}; };
class OSGUTIL_EXPORT Edgeloop : public osg::Referenced struct OSGUTIL_EXPORT Edgeloop : public osg::Referenced
{ {
public:
typedef std::vector<osg::ref_ptr<Edge> > EdgeList; typedef std::vector<osg::ref_ptr<Edge> > EdgeList;
bool isClosed() { return (_edgeList.back()->endConnected(*_edgeList.front().get())); } bool isClosed() { return (_edgeList.back()->endConnected(*_edgeList.front().get())); }

View File

@ -69,8 +69,8 @@ void FreeTypeFont::setFontResolution(const osgText::FontResolution& fontSize)
int maxAxis = std::max(width, height); int maxAxis = std::max(width, height);
int margin = _facade->getGlyphImageMargin() + (int)((float)maxAxis * _facade->getGlyphImageMarginRatio()); int margin = _facade->getGlyphImageMargin() + (int)((float)maxAxis * _facade->getGlyphImageMarginRatio());
if (width+2*margin>_facade->getTextureWidthHint() || if ((unsigned int)(width+2*margin) > _facade->getTextureWidthHint() ||
width+2*margin>_facade->getTextureHeightHint()) (unsigned int)(width+2*margin) > _facade->getTextureHeightHint())
{ {
osg::notify(osg::WARN)<<"Warning: FreeTypeFont::setSize("<<width<<","<<height<<") sizes too large,"<<std::endl; osg::notify(osg::WARN)<<"Warning: FreeTypeFont::setSize("<<width<<","<<height<<") sizes too large,"<<std::endl;