2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

key_manager: Use std::vector's insert() instead of std::copy with a back_inserter

If the data is unconditionally being appended to the back of a
std::vector, we can just directly insert it there without the need to
insert all of the elements one-by-one with a std::back_inserter.
This commit is contained in:
Lioncash 2018-10-13 08:28:15 -04:00
parent e70c08b543
commit 06898263f6

View file

@ -881,9 +881,9 @@ void KeyManager::DeriveETicket(PartitionDataManager& data) {
"/system/save/80000000000000e2", "/system/save/80000000000000e2",
"rb+"); "rb+");
const auto blob2 = GetTicketblob(save2);
auto res = GetTicketblob(save1); auto res = GetTicketblob(save1);
const auto res2 = GetTicketblob(save2); res.insert(res.end(), blob2.begin(), blob2.end());
std::copy(res2.begin(), res2.end(), std::back_inserter(res));
for (const auto& raw : res) { for (const auto& raw : res) {
const auto pair = ParseTicket(raw, rsa_key); const auto pair = ParseTicket(raw, rsa_key);