1
0
mirror of https://github.com/luanti-org/minetestmapper.git synced 2025-10-06 05:45:21 +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

@@ -8,7 +8,7 @@
#include <string>
#include <sstream>
#include <stdexcept>
#include "cmake_config.h"
#include "config.h"
#include "TileGenerator.h"
static void usage()
@@ -58,7 +58,7 @@ static void usage()
static bool file_exists(const std::string &path)
{
std::ifstream ifs(path.c_str());
std::ifstream ifs(path);
return ifs.is_open();
}
@@ -256,7 +256,7 @@ int main(int argc, char *argv[])
generator.parseColorsFile(colors);
generator.generate(input, output);
} catch(std::runtime_error &e) {
} catch (const std::runtime_error &e) {
std::cerr << "Exception: " << e.what() << std::endl;
return 1;
}