mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
parent
736cd175d5
commit
bbf33e8e4d
202 changed files with 7389 additions and 5609 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue