Saveload: Change SlSaveToVector to be templated, add SlSaveToTempBuffer

This commit is contained in:
Jonathan G Rennison
2023-08-14 17:49:54 +01:00
parent d0c6b7136d
commit f378167951
3 changed files with 42 additions and 11 deletions

View File

@@ -659,7 +659,7 @@ static void Save_PLYP()
return;
}
std::vector<byte> buffer = SlSaveToVector([](void *) {
std::vector<byte> buffer = SlSaveToVector([]() {
SlWriteUint32((uint32)_network_company_server_id.size());
MemoryDumper::GetCurrent()->CopyBytes((const uint8 *)_network_company_server_id.data(), _network_company_server_id.size());
@@ -681,7 +681,7 @@ static void Save_PLYP()
} else {
SlWriteByte(0);
}
}, nullptr);
});
uint8 mac[16]; /* Message authentication code */