From 6ca573dfd36b03c6e2a5bed3b898b2ced9290a66 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 8 Jan 2008 17:18:11 +0000 Subject: [PATCH] From Jean-Sebastien Guay, Warning fixes --- include/osgUtil/EdgeCollector | 17 ++++++++--------- src/osgPlugins/freetype/FreeTypeFont.cpp | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/osgUtil/EdgeCollector b/include/osgUtil/EdgeCollector index 69b9f702a..0dda05d1b 100644 --- a/include/osgUtil/EdgeCollector +++ b/include/osgUtil/EdgeCollector @@ -167,16 +167,15 @@ public: osg::Plane _plane; }; - class OSGUTIL_EXPORT Edgeloop : public osg::Referenced + struct OSGUTIL_EXPORT Edgeloop : public osg::Referenced { - public: - typedef std::vector > EdgeList; - - bool isClosed() { return (_edgeList.back()->endConnected(*_edgeList.front().get())); } - - osg::UIntArray * toIndexArray() const; - - EdgeList _edgeList; + typedef std::vector > EdgeList; + + bool isClosed() { return (_edgeList.back()->endConnected(*_edgeList.front().get())); } + + osg::UIntArray * toIndexArray() const; + + EdgeList _edgeList; }; diff --git a/src/osgPlugins/freetype/FreeTypeFont.cpp b/src/osgPlugins/freetype/FreeTypeFont.cpp index a7662fcaa..099541945 100644 --- a/src/osgPlugins/freetype/FreeTypeFont.cpp +++ b/src/osgPlugins/freetype/FreeTypeFont.cpp @@ -69,8 +69,8 @@ void FreeTypeFont::setFontResolution(const osgText::FontResolution& fontSize) int maxAxis = std::max(width, height); int margin = _facade->getGlyphImageMargin() + (int)((float)maxAxis * _facade->getGlyphImageMarginRatio()); - if (width+2*margin>_facade->getTextureWidthHint() || - width+2*margin>_facade->getTextureHeightHint()) + if ((unsigned int)(width+2*margin) > _facade->getTextureWidthHint() || + (unsigned int)(width+2*margin) > _facade->getTextureHeightHint()) { osg::notify(osg::WARN)<<"Warning: FreeTypeFont::setSize("<