From 617eeb09e03f9f2727269c0424a05ee5678f32b9 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 19 Jul 2020 01:02:41 +1000 Subject: [PATCH] Address issues --- src/yuzu/debugger/wait_tree.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 5a974d2a03..f391a41a91 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -37,8 +37,8 @@ constexpr std::array, 10> WaitTreeColors{{ }}; bool IsDarkTheme() { - const auto theme = UISettings::values.theme.toStdString(); - return theme == "qdarkstyle" || theme == "colorful_dark"; + const auto& theme = UISettings::values.theme; + return theme == QStringLiteral("qdarkstyle") || theme == QStringLiteral("colorful_dark"); } } // namespace @@ -291,10 +291,7 @@ QString WaitTreeThread::GetText() const { } QColor WaitTreeThread::GetColor() const { - std::size_t color_index = 0; - if (IsDarkTheme()) { - color_index = 1; - } + const std::size_t color_index = IsDarkTheme() ? 1 : 0; const auto& thread = static_cast(object); switch (thread.GetStatus()) {