Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small refactor on FxMixerView.cpp and FxMixer.cpp #5577

Merged
merged 1 commit into from
Jul 12, 2020

Conversation

IanCaio
Copy link
Contributor

@IanCaio IanCaio commented Jul 12, 2020

The codes on FxMixerView.cpp and FxMixer.cpp were using the types TrackContainer::TrackList and QVector<Track *> unconsistently. TrackContainer::TrackList is just a typedef for QVector<Track *> so it makes sense that we use it, specially in terms of readability.

Places where QVector<Track *> were used are now replaced with TrackContainer::TrackList.

Also, we were not including "TrackContainer.h" directly (the typedef was likely being included indirectly through one of the other include files), so we also include this header on both source codes.

The code on FxMixerView.cpp and FxMixer.cpp were using the types TrackContainer::TrackList and QVector<Track *> unconsistently. TrackContainer::TrackList is just a typedef for QVector<Track *> so it makes sense that we use it, specially in terms of readability.

Places where QVector<Track *> were used are now replaced with TrackContainer::TrackList.

Also, we were not including "TrackContainer.h" directly (the typedef was likely being included indirectly through one of the other include files), so we also include this header on both source codes.
@LmmsBot
Copy link

LmmsBot commented Jul 12, 2020

🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩

Linux

Windows

macOS

🤖
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://7415-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.663-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/7415?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://7413-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.663-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/7413?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://7411-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.663-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/7411?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/7v5ku98fs6aw5lwe/artifacts/build/lmms-1.2.2-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/34049181"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/lqhlur93qj7i80ev/artifacts/build/lmms-1.2.2-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/34049181"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://7414-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.663-mac10.13.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/7414?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "3795fdff646c1dff5ac03067e02b752165e8642c"}

@Spekular
Copy link
Member

Since FxMixerView already used TrackContainer::TrackList, I don't see any arguments against being consistent with it. Nice catch!

@Spekular Spekular merged commit 574839f into LMMS:master Jul 12, 2020
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
FxMixerView.cpp and FxMixer.cpp were inconsistent in their use of TrackContainer::TrackList vs QVector<Track *>. The former is a typedef of the latter, so this PR replaces all instances of QVector<Track *> with TrackContainer::TrackList.

Also, we were not including "TrackContainer.h" directly (the typedef was likely being included indirectly through one of the other include files), so we also include this header on both source codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants