From 9a2dc98753cac5c84bca7a1a0698b3d071740a69 Mon Sep 17 00:00:00 2001 From: Fan Jiang Date: Fri, 8 Jun 2018 14:25:36 +0800 Subject: [PATCH] Follow ogre 1.10 conventions --- src/rviz/ogre_helpers/movable_text.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rviz/ogre_helpers/movable_text.cpp b/src/rviz/ogre_helpers/movable_text.cpp index 8420e62b5f..55b8cf5e71 100644 --- a/src/rviz/ogre_helpers/movable_text.cpp +++ b/src/rviz/ogre_helpers/movable_text.cpp @@ -105,14 +105,14 @@ void MovableText::setFontName(const String &fontName) Ogre::MaterialManager::getSingleton().remove(mName + "Material"); } - if (mFontName != fontName || mpMaterial.isNull() || !(mpFont.get())) + if (mFontName != fontName || mpMaterial.isNull() || mpFont.isNull()) { mFontName = fontName; mpFont = FontManager::getSingleton().getByName(mFontName); // Workaround for getByName bug - if (!(mpFont.get())){ + if (mpFont.isNull()){ auto fonts = FontManager::getSingleton().getResourceIterator(); while(fonts.hasMoreElements()){ @@ -123,7 +123,7 @@ void MovableText::setFontName(const String &fontName) } } } - if (!(mpFont.get())) + if (mpFont.isNull()) throw Exception(Exception::ERR_ITEM_NOT_FOUND, "Could not find font " + fontName, "MovableText::setFontName"); @@ -230,7 +230,7 @@ void MovableText::showOnTop(bool show) void MovableText::_setupGeometry() { - assert(mpFont); + assert(!mpFont.isNull()); assert(!mpMaterial.isNull()); unsigned int vertexCount = 0;