1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Clean up server-side translations, remove global variable (#10075)

This commit is contained in:
rubenwardy 2020-09-16 14:51:11 +01:00 committed by GitHub
parent c8303f790c
commit 9ec75d7765
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 50 additions and 65 deletions

View file

@ -52,15 +52,7 @@ std::vector<ServerListSpec> 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);
}