format: reformat project

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov
2024-08-03 19:53:48 +03:00
committed by Pugemon
parent 736cd175d5
commit bbf33e8e4d
202 changed files with 7389 additions and 5609 deletions
+11 -8
View File
@@ -1,12 +1,12 @@
#include "command_line.hpp"
#include "../files/engine_paths.hpp"
#include <iostream>
#include <filesystem>
#include <string>
#include <cstring>
#include <filesystem>
#include <iostream>
#include <stdexcept>
#include <string>
#include "../files/engine_paths.hpp"
namespace fs = std::filesystem;
@@ -16,7 +16,8 @@ class ArgsReader {
int argc;
int pos = 0;
public:
ArgsReader(int argc, char** argv) : argv(argv), argc(argc) {}
ArgsReader(int argc, char** argv) : argv(argv), argc(argc) {
}
void skip() {
pos++;
@@ -39,11 +40,13 @@ public:
}
};
bool perform_keyword(ArgsReader& reader, const std::string& keyword, EnginePaths& paths) {
bool perform_keyword(
ArgsReader& reader, const std::string& keyword, EnginePaths& paths
) {
if (keyword == "--res") {
auto token = reader.next();
if (!fs::is_directory(fs::path(token))) {
throw std::runtime_error(token+" is not a directory");
throw std::runtime_error(token + " is not a directory");
}
paths.setResources(fs::path(token));
std::cout << "resources folder: " << token << std::endl;