Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

refactor:Improve readability with braces and continue statements

Abel You1eaf17805e1e
diff --git a/toonz/sources/toonzlib/sceneresources.cpp b/toonz/sources/toonzlib/sceneresources.cpp
index b3c4f8ff5..bee04f404 100644
--- a/toonz/sources/toonzlib/sceneresources.cpp
+++ b/toonz/sources/toonzlib/sceneresources.cpp
@@ -492,11 +492,20 @@ void SceneResources::getResources() {
for (it = levels.begin(); it != levels.end(); ++it) {
TXshSimpleLevel *sl = (*it)->getSimpleLevel();
- if (sl) m_resources.push_back(new SceneLevel(scene, sl));
+ if (sl) {
+ m_resources.push_back(new SceneLevel(scene, sl));
+ continue;
+ }
TXshPaletteLevel *pl = (*it)->getPaletteLevel();
- if (pl) m_resources.push_back(new ScenePalette(scene, pl));
+ if (pl) {
+ m_resources.push_back(new ScenePalette(scene, pl));
+ continue;
+ }
TXshSoundLevel *sdl = (*it)->getSoundLevel();
- if (sdl) m_resources.push_back(new SceneSound(scene, sdl));
+ if (sdl) {
+ m_resources.push_back(new SceneSound(scene, sdl));
+ continue;
+ }
}
}