Skip to content

Commit 74e25a0

Browse files
committed
PatchFactory: refactor modernize() function
1 parent 8dd5e14 commit 74e25a0

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/core/patchFactory.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,17 +442,16 @@ void modernize_(Patch& patch)
442442
patch.tracks.push_back({G_DEFAULT_TRACK_WIDTH, /*internal=*/true, {}});
443443
patch.tracks.push_back({G_DEFAULT_TRACK_WIDTH, /*internal=*/false, {groupChannelId}});
444444
patch.channels.push_back({groupChannelId, ChannelType::GROUP, G_GUI_UNIT});
445-
}
446445

447-
for (Patch::Channel& c : patch.channels)
448-
{
449-
/* 1.1.0
450-
Let's put non-group channels into the relevant tracks. */
451-
if (patch.version < Version{1, 1, 0} && c.type != ChannelType::GROUP)
446+
for (Patch::Channel& c : patch.channels)
452447
{
453-
const bool isInternalChannel = c.type == ChannelType::PREVIEW || c.type == ChannelType::MASTER;
454-
const std::size_t targetIndex = isInternalChannel ? 0 : 1;
455-
patch.tracks[targetIndex].channels.push_back(c.id);
448+
/* Let's put non-group channels into the relevant tracks. */
449+
if (c.type != ChannelType::GROUP)
450+
{
451+
const bool isInternalChannel = c.type == ChannelType::PREVIEW || c.type == ChannelType::MASTER;
452+
const std::size_t targetIndex = isInternalChannel ? 0 : 1;
453+
patch.tracks[targetIndex].channels.push_back(c.id);
454+
}
456455
}
457456
}
458457
}

0 commit comments

Comments
 (0)