format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user