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

Remove redundant initialization #7839

Open
wants to merge 1 commit into
base: master
from

Conversation

3 participants
@ShFil119
Copy link
Contributor

ShFil119 commented Mar 2, 2019

No description provided.

@jordan-woyak
Copy link
Member

jordan-woyak left a comment

LGTM.

@@ -17,7 +17,7 @@ class PulseAudio final : public SoundStream
{
#if defined(HAVE_PULSEAUDIO) && HAVE_PULSEAUDIO
public:
PulseAudio();
PulseAudio() = default;

This comment has been minimized.

@lioncash

lioncash Mar 3, 2019

Member

This should still be defaulted within the cpp file, since the class contains non-trivial members.

This comment has been minimized.

@ShFil119

ShFil119 Mar 3, 2019

Author Contributor

done

@@ -114,10 +114,10 @@ class Wiimote
int GetIndex() const;

protected:
Wiimote();
int m_index;
Wiimote() = default;

This comment has been minimized.

@lioncash

lioncash Mar 3, 2019

Member

Ditto

This comment has been minimized.

@ShFil119

ShFil119 Mar 3, 2019

Author Contributor

done

@@ -118,8 +118,6 @@ static const char* regnames[32] = {"r0", "sp", "rtoc", "r3", "r4", "r5", "r
// Initialize static class variables.
u32* GekkoDisassembler::m_instr = nullptr;
u32* GekkoDisassembler::m_iaddr = nullptr;
std::string GekkoDisassembler::m_opcode = "";

This comment has been minimized.

@lioncash

lioncash Mar 3, 2019

Member

These should still be specified, but just without the initializers, otherwise this can cause compilation errors in the event either std::string instance is taken by reference in the future. Ideally if we we're using C++17 already, it would be fine to mark the relevant member variables as static inline, but we aren't yet.

This comment has been minimized.

@ShFil119

ShFil119 Mar 3, 2019

Author Contributor

done

@ShFil119 ShFil119 force-pushed the ShFil119:impr/redundant branch from a0eb37b to 9348ebe Mar 3, 2019

@ShFil119 ShFil119 force-pushed the ShFil119:impr/redundant branch from 9348ebe to a7dda44 Mar 3, 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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.