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

DSP/LabelMap: C++17 transitional changes/cleanup #8162

merged 6 commits into from Jun 8, 2019


3 participants
Copy link

commented Jun 7, 2019

With C++17 we can tidy up the interface a little bit. We're also able to hide the definition of labels entirely from code that uses LabelMap. This makes for less files to rebuild if the label structure itself ever needs to change.

lioncash added some commits Jun 7, 2019

DSP/LabelMap: Amend class formatting
Places the most important stuff, the public interface first.
DSP/LabelMap: Default constructor and destructor
We also move the destructor definition into the cpp file, as that will
allow us to make the entire label_t type hidden from external view in a
following change.
DSP/LabelMap: Use std::optional with GetLabelValue()
Rather than use a bool and out parameter, we can collapse them into one
by using a std::optional.
DSP/LabelMap: Make label_t's definition hidden
Given this is a private struct and it's used in a container that
supports incomplete types, we can forward-declare it and move it into
the cpp file. While we're at it, we can change the name to Label to
follow our formatting guidelines.
DSP/LabelMap: std::move std::string instances where applicable
We can std::move the std::string parameter in Label's constructor,
allowing the constructor to be moved into in calling code.

We can cascade this outwards in the interface as well.

@leoetlino leoetlino merged commit d927cd2 into dolphin-emu:master Jun 8, 2019

10 checks passed

default Very basic checks passed, handed off to Buildbot.
lint Build succeeded on builder lint
pr-android Build succeeded on builder pr-android
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
pr-deb-x64 Build succeeded on builder pr-deb-x64
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
pr-osx-x64 Build succeeded on builder pr-osx-x64
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
pr-win-dbg-x64 Build succeeded on builder pr-win-dbg-x64
pr-win-x64 Build succeeded on builder pr-win-x64

@lioncash lioncash deleted the lioncash:label branch Jun 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.