From 9ca7e582505728ee0bcecc3d506eb1d697f4d1fe Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 1 Mar 2021 19:40:23 +0100 Subject: [PATCH] Fixed some minor warnings reported by the Clang static analyzer. --- es-app/src/SystemScreensaver.cpp | 2 +- es-app/src/views/SystemView.cpp | 2 -- es-core/src/components/ComponentGrid.cpp | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/es-app/src/SystemScreensaver.cpp b/es-app/src/SystemScreensaver.cpp index 545148b42..f29769e7e 100644 --- a/es-app/src/SystemScreensaver.cpp +++ b/es-app/src/SystemScreensaver.cpp @@ -603,7 +603,7 @@ void SystemScreensaver::generateOverlayInfo() float posY = static_cast(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; diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 1a71c2cba..e8201a3ad 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -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 && diff --git a/es-core/src/components/ComponentGrid.cpp b/es-core/src/components/ComponentGrid.cpp index a4c7cd747..488b72f83 100644 --- a/es-core/src/components/ComponentGrid.cpp +++ b/es-core/src/components/ComponentGrid.cpp @@ -163,7 +163,6 @@ void ComponentGrid::updateSeparators() { mSeparators.clear(); - const unsigned int color = Renderer::convertRGBAToABGR(0xC6C7C6FF); bool drawAll = Settings::getInstance()->getBool("DebugGrid"); Vector2f pos;