mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Clean up server-side translations, remove global variable (#10075)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user