From 47c8f5988d81483ddb657cb4c283012d351723f1 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 15 Sep 2022 17:34:20 +0200 Subject: [PATCH] Some very minor code cleanup. --- es-app/src/views/GamelistLegacy.h | 2 +- es-core/src/components/DateTimeComponent.cpp | 6 +++--- es-core/src/components/VideoComponent.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/es-app/src/views/GamelistLegacy.h b/es-app/src/views/GamelistLegacy.h index 1aff20589..5eced0475 100644 --- a/es-app/src/views/GamelistLegacy.h +++ b/es-app/src/views/GamelistLegacy.h @@ -397,7 +397,7 @@ void GamelistView::legacyUpdateView(const CursorState& state) rating->setVisible(true); } - bool fadingOut = false; + bool fadingOut {false}; if (file == nullptr) { if (mViewStyle == ViewController::VIDEO) { mVideoComponents.front()->stopVideoPlayer(); diff --git a/es-core/src/components/DateTimeComponent.cpp b/es-core/src/components/DateTimeComponent.cpp index 8cc17de92..9b121ea1a 100644 --- a/es-core/src/components/DateTimeComponent.cpp +++ b/es-core/src/components/DateTimeComponent.cpp @@ -72,8 +72,8 @@ std::string DateTimeComponent::getDisplayString() const if (mTime.getTime() < 82800) return "never"; - Utils::Time::DateTime now(Utils::Time::now()); - Utils::Time::Duration dur(now.getTime() - mTime.getTime()); + Utils::Time::DateTime now {Utils::Time::now()}; + Utils::Time::Duration dur {now.getTime() - mTime.getTime()}; std::string buf; @@ -113,7 +113,7 @@ void DateTimeComponent::applyTheme(const std::shared_ptr& theme, GuiComponent::applyTheme(theme, view, element, properties); using namespace ThemeFlags; - const ThemeData::ThemeElement* elem = theme->getElement(view, element, "datetime"); + const ThemeData::ThemeElement* elem {theme->getElement(view, element, "datetime")}; if (!elem) return; diff --git a/es-core/src/components/VideoComponent.cpp b/es-core/src/components/VideoComponent.cpp index 942354c3e..6839aee81 100644 --- a/es-core/src/components/VideoComponent.cpp +++ b/es-core/src/components/VideoComponent.cpp @@ -105,7 +105,7 @@ void VideoComponent::applyTheme(const std::shared_ptr& theme, (properties ^ ThemeFlags::SIZE) | ((properties & (ThemeFlags::SIZE | POSITION)) ? ORIGIN : 0)); - const ThemeData::ThemeElement* elem = theme->getElement(view, element, "video"); + const ThemeData::ThemeElement* elem {theme->getElement(view, element, "video")}; mLegacyTheme = theme->isLegacyTheme();