[feat] use unordered map to store recent connection info so that the most recent connections are shown at the front

This commit is contained in:
dijunkun
2025-07-15 17:34:25 +08:00
parent 75021b74ef
commit f650b5a6ef
3 changed files with 10 additions and 6 deletions

View File

@@ -186,8 +186,8 @@ int Thumbnail::SaveToThumbnail(const char* yuv420p, int width, int height,
int Thumbnail::LoadThumbnail(
SDL_Renderer* renderer,
std::map<std::string, RecentConnection>& recent_connections, int* width,
int* height) {
std::unordered_map<std::string, RecentConnection>& recent_connections,
int* width, int* height) {
for (auto& it : recent_connections) {
if (it.second.texture != nullptr) {
SDL_DestroyTexture(it.second.texture);