From 9ec75d77651c333eca3c5b46a3a56c8353fed464 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 16 Sep 2020 14:51:11 +0100 Subject: Clean up server-side translations, remove global variable (#10075) --- src/serverlist.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/serverlist.cpp') diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 2f6ab2e61..c7fe2d888 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -52,15 +52,7 @@ std::vector getLocal() { std::string path = ServerList::getFilePath(); std::string liststring; - if (fs::PathExists(path)) { - std::ifstream istream(path.c_str()); - if (istream.is_open()) { - std::ostringstream ostream; - ostream << istream.rdbuf(); - liststring = ostream.str(); - istream.close(); - } - } + fs::ReadFile(path, liststring); return deSerialize(liststring); } -- cgit v1.2.3