Skip to content

Commit

Permalink
Simplify return statement
Browse files Browse the repository at this point in the history
  • Loading branch information
brdvd committed Nov 9, 2024
1 parent 7eec4f3 commit 4188cc4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ bool Resources::SetCurrentFont(const std::string &fontName, bool allowLoading)
m_currentFontName = fontName;
return true;
}
else {
return false;
}

return false;
}

const Glyph *Resources::GetGlyph(char32_t smuflCode) const
Expand Down Expand Up @@ -234,12 +233,7 @@ bool Resources::FontHasGlyphAvailable(const std::string &fontName, char32_t smuf
}

const GlyphTable &table = m_loadedFonts.at(fontName).GetGlyphTable();
if (table.find(smuflCode) != table.end()) {
return true;
}
else {
return false;
}
return (table.find(smuflCode) != table.end());
}

std::string Resources::GetCSSFontFor(const std::string &fontName) const
Expand Down

0 comments on commit 4188cc4

Please sign in to comment.