1
0
mirror of https://github.com/luanti-org/minetestmapper.git synced 2025-10-05 21:35:22 +02:00

Some more code modernization

also a few small performance improvements
This commit is contained in:
sfan5
2020-05-08 22:10:49 +02:00
parent 2979dc5b6b
commit 8e83ce6464
21 changed files with 149 additions and 199 deletions

View File

@@ -1,18 +1,9 @@
#ifndef UTIL_H
#define UTIL_H
#pragma once
#include <string>
#include <fstream>
std::string read_setting(const std::string &name, std::istream &is);
inline std::string read_setting_default(const std::string &name, std::istream &is, const std::string &def)
{
try {
return read_setting(name, is);
} catch(const std::runtime_error &e) {
return def;
}
}
#endif // UTIL_H
std::string read_setting_default(const std::string &name, std::istream &is,
const std::string &def);