From e583a2dc5bb8ca19fc4f9146f48e15d1bbaa3abe Mon Sep 17 00:00:00 2001 From: Erymanthus | RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:01:40 -0500 Subject: [PATCH] add some braces around if --- loader/src/loader/SettingNodeV3.cpp | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/loader/src/loader/SettingNodeV3.cpp b/loader/src/loader/SettingNodeV3.cpp index 0589e6303..fab93e3fa 100644 --- a/loader/src/loader/SettingNodeV3.cpp +++ b/loader/src/loader/SettingNodeV3.cpp @@ -142,20 +142,23 @@ void SettingNodeV3::updateState(CCNode* invoker) { void SettingNodeV3::onDescription(CCObject*) { auto title = m_impl->setting->getDisplayName(); - if (!m_impl->setting->getScrollableDescription()) FLAlertLayer::create( - nullptr, - title.c_str(), - m_impl->setting->getDescription().value_or("No description provided"), - "OK", nullptr, - clamp(title.size() * 16, 300, 400) - )->show(); - else FLAlertLayer::create( - nullptr, - title.c_str(), - m_impl->setting->getDescription().value_or("No description provided"), - "OK", nullptr, - 420.f, true, 320.f, 1.0f // params in order: width, scrollable bool, height, textScale - )->show(); + if (!m_impl->setting->getScrollableDescription()) { + FLAlertLayer::create( + nullptr, + title.c_str(), + m_impl->setting->getDescription().value_or("No description provided"), + "OK", nullptr, + clamp(title.size() * 16, 300, 400) + )->show(); + } else { + FLAlertLayer::create( + nullptr, + title.c_str(), + m_impl->setting->getDescription().value_or("No description provided"), + "OK", nullptr, + 420.f, true, 320.f, 1.0f // params in order: width, scrollable bool, height, textScale + )->show(); + } } void SettingNodeV3::onReset(CCObject*) { createQuickPopup(