Skip to content

Commit

Permalink
Follow ogre 1.10 conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfFan committed Jun 8, 2018
1 parent 6f312b5 commit 9a2dc98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rviz/ogre_helpers/movable_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()){
Expand All @@ -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");

Expand Down Expand Up @@ -230,7 +230,7 @@ void MovableText::showOnTop(bool show)

void MovableText::_setupGeometry()
{
assert(mpFont);
assert(!mpFont.isNull());
assert(!mpMaterial.isNull());

unsigned int vertexCount = 0;
Expand Down

0 comments on commit 9a2dc98

Please sign in to comment.