Skip to content

Commit

Permalink
[libromdata] GameCube, WiiTMD, WiiWAD: Use C++11 initialization for t…
Browse files Browse the repository at this point in the history
…he access rights header vector.
  • Loading branch information
GerbilSoft committed Nov 10, 2024
1 parent a6a4eb8 commit 98bc4e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/libromdata/Console/GameCube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,10 +1425,10 @@ int GameCube::loadFieldData(void)
be32_to_cpu(tmdHeader->title_id.lo)));

// Access rights.
vector<string> *const v_access_rights_hdr = new vector<string>();
v_access_rights_hdr->reserve(2);
v_access_rights_hdr->emplace_back("AHBPROT");
v_access_rights_hdr->emplace_back(C_("Wii", "DVD Video"));
vector<string> *const v_access_rights_hdr = new vector<string>({
"AHBPROT",
C_("Wii", "DVD Video")
});
d->fields.addField_bitfield(C_("Wii", "Access Rights"),
v_access_rights_hdr, 0, be32_to_cpu(tmdHeader->access_rights));

Expand Down
8 changes: 4 additions & 4 deletions src/libromdata/Console/WiiTMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,10 @@ int WiiTMD::loadFieldData(void)

// Access rights
if (sysID == NINTENDO_SYSID_RVL || sysID == NINTENDO_SYSID_WUP) {
vector<string> *const v_access_rights_hdr = new vector<string>();
v_access_rights_hdr->reserve(2);
v_access_rights_hdr->emplace_back("AHBPROT");
v_access_rights_hdr->emplace_back(C_("Wii", "DVD Video"));
vector<string> *const v_access_rights_hdr = new vector<string>({
"AHBPROT",
C_("Wii", "DVD Video")
});
d->fields.addField_bitfield(C_("Wii", "Access Rights"),
v_access_rights_hdr, 0, be32_to_cpu(tmdHeader->access_rights));
}
Expand Down
8 changes: 4 additions & 4 deletions src/libromdata/Console/WiiWAD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,10 +978,10 @@ int WiiWAD::loadFieldData(void)
}

// Access rights.
vector<string> *const v_access_rights_hdr = new vector<string>();
v_access_rights_hdr->reserve(2);
v_access_rights_hdr->emplace_back("AHBPROT");
v_access_rights_hdr->emplace_back(C_("Wii", "DVD Video"));
vector<string> *const v_access_rights_hdr = new vector<string>({
"AHBPROT",
C_("Wii", "DVD Video")
});
d->fields.addField_bitfield(C_("Wii", "Access Rights"),
v_access_rights_hdr, 0, be32_to_cpu(tmdHeader->access_rights));

Expand Down

0 comments on commit 98bc4e5

Please sign in to comment.