Skip to content

Commit e583a2d

Browse files
authored
add some braces around if
1 parent fc98d93 commit e583a2d

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

loader/src/loader/SettingNodeV3.cpp

+17-14
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,23 @@ void SettingNodeV3::updateState(CCNode* invoker) {
142142

143143
void SettingNodeV3::onDescription(CCObject*) {
144144
auto title = m_impl->setting->getDisplayName();
145-
if (!m_impl->setting->getScrollableDescription()) FLAlertLayer::create(
146-
nullptr,
147-
title.c_str(),
148-
m_impl->setting->getDescription().value_or("No description provided"),
149-
"OK", nullptr,
150-
clamp(title.size() * 16, 300, 400)
151-
)->show();
152-
else FLAlertLayer::create(
153-
nullptr,
154-
title.c_str(),
155-
m_impl->setting->getDescription().value_or("No description provided"),
156-
"OK", nullptr,
157-
420.f, true, 320.f, 1.0f // params in order: width, scrollable bool, height, textScale
158-
)->show();
145+
if (!m_impl->setting->getScrollableDescription()) {
146+
FLAlertLayer::create(
147+
nullptr,
148+
title.c_str(),
149+
m_impl->setting->getDescription().value_or("No description provided"),
150+
"OK", nullptr,
151+
clamp(title.size() * 16, 300, 400)
152+
)->show();
153+
} else {
154+
FLAlertLayer::create(
155+
nullptr,
156+
title.c_str(),
157+
m_impl->setting->getDescription().value_or("No description provided"),
158+
"OK", nullptr,
159+
420.f, true, 320.f, 1.0f // params in order: width, scrollable bool, height, textScale
160+
)->show();
161+
}
159162
}
160163
void SettingNodeV3::onReset(CCObject*) {
161164
createQuickPopup(

0 commit comments

Comments
 (0)