Skip to content
Permalink
Browse files

Make core.get_favorites("local") ignore duplicates (#7926)

  • Loading branch information
pauloue authored and SmallJoker committed Nov 8, 2019
1 parent 2a74727 commit d11bfa3ef5e8d63068096c52bc2faccba65b0b47
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/serverlist.cpp
@@ -155,6 +155,16 @@ std::vector<ServerListSpec> deSerialize(const std::string &liststring)
server["address"] = tmp;
std::getline(stream, tmp);
server["port"] = tmp;
bool unique = true;
for (const ServerListSpec &added : serverlist) {
if (server["name"] == added["name"]
&& server["port"] == added["port"]) {
unique = false;
break;
}
}
if (!unique)
continue;
std::getline(stream, tmp);
server["description"] = tmp;
serverlist.push_back(server);

0 comments on commit d11bfa3

Please sign in to comment.
You can’t perform that action at this time.