Skip to content

Commit b89073c

Browse files
committed
Clean up code
1 parent 9b03af6 commit b89073c

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/pages/Attributes.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void DevTools::drawNodeAttributes(CCNode* node) {
311311
ImGui::Separator();
312312
ImGui::NewLine();
313313
}
314-
auto layoutOptsFn = [node] {
314+
[&] {
315315
if (auto rawOpts = node->getLayoutOptions()) {
316316
ImGui::Text("Layout options: %s", typeid(*rawOpts).name());
317317

@@ -637,14 +637,13 @@ void DevTools::drawNodeAttributes(CCNode* node) {
637637
node->setLayoutOptions(AnchorLayoutOptions::create());
638638
}
639639
}
640-
};
641-
layoutOptsFn();
640+
}();
642641

643642
ImGui::NewLine();
644643
ImGui::Separator();
645644
ImGui::NewLine();
646645

647-
auto layoutFn = [node] {
646+
[&] {
648647
if (auto rawLayout = node->getLayout()) {
649648
ImGui::Text("Layout: %s", typeid(*rawLayout).name());
650649

@@ -1084,8 +1083,7 @@ void DevTools::drawNodeAttributes(CCNode* node) {
10841083
node->setLayout(AnchorLayout::create());
10851084
}
10861085
}
1087-
};
1088-
layoutFn();
1086+
}();
10891087
}
10901088

10911089
void DevTools::drawAttributes() {

0 commit comments

Comments
 (0)