Fixed some minor warnings reported by the Clang static analyzer.

This commit is contained in:
Leon Styhre 2021-03-01 19:40:23 +01:00
parent d73d32754d
commit 9ca7e58250
3 changed files with 1 additions and 4 deletions

View file

@ -603,7 +603,7 @@ void SystemScreensaver::generateOverlayInfo()
float posY = static_cast<float>(Renderer::getWindowHeight()) * 0.02f;
std::string favoriteChar;
if (mCurrentGame->getFavorite())
if (mCurrentGame && mCurrentGame->getFavorite())
favoriteChar = " " + ViewController::FAVORITE_CHAR;
const std::string gameName = Utils::String::toUpper(mGameName) + favoriteChar;

View file

@ -299,8 +299,6 @@ void SystemView::onCursorChanged(const CursorState& /*state*/)
}
std::string transition_style = Settings::getInstance()->getString("TransitionStyle");
bool goFast = transition_style == "instant";
const float infoStartOpacity = mSystemInfo.getOpacity() / 255.f;
// To prevent ugly jumps with two systems when quickly repeating the same direction.
if (mPreviousScrollVelocity != 0 && posMax == 2 &&

View file

@ -163,7 +163,6 @@ void ComponentGrid::updateSeparators()
{
mSeparators.clear();
const unsigned int color = Renderer::convertRGBAToABGR(0xC6C7C6FF);
bool drawAll = Settings::getInstance()->getBool("DebugGrid");
Vector2f pos;