PatchEngine: Give Patch and PatchEntry default member initializers

Avoids potentially using the values uninitialized. While we're at it,
also drop the prefixed underscores from one of the constructors.
This commit is contained in:
Lioncash
2018-05-13 13:53:49 -04:00
parent 9d1157f695
commit a166cf2481
3 changed files with 10 additions and 14 deletions

View File

@ -79,11 +79,7 @@ void NewPatchDialog::ConnectWidgets()
void NewPatchDialog::AddEntry()
{
PatchEngine::PatchEntry entry;
entry.type = PatchEngine::PATCH_8BIT;
entry.address = entry.value = 0;
m_patch.entries.push_back(entry);
m_patch.entries.emplace_back();
m_entry_layout->addWidget(CreateEntry(static_cast<int>(m_patch.entries.size() - 1)));
}