Merge pull request #18 from lucaspalomodevelop/17-headers-only

17 headers only
This commit is contained in:
Lucas Palomo Develop 2023-12-08 23:15:38 +01:00 committed by GitHub
commit 69f243ba0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 7 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "libs/json"]
path = libs/json
url = git@github.com:nlohmann/json.git

1
libs/json Submodule

@ -0,0 +1 @@
Subproject commit 3780b41dd070436f3f55327b0a88f27a52e2dfa8

View File

@ -3,7 +3,7 @@
#ifndef SETTINGS_H
#define SETTINGS_H
#include <nlohmann/json.hpp>
#include "../libs/json/single_include/nlohmann/json.hpp"
using json = nlohmann::json;

View File

@ -9,7 +9,7 @@
#include <filesystem>
#include <fstream>
#include <nlohmann/json.hpp>
#include "../libs/json/single_include/nlohmann/json.hpp"
using json = nlohmann::json;
class Setup
@ -48,19 +48,16 @@ public:
{
std::replace(home.begin(), home.end(), '\\', '/');
std::ofstream file(home + "/.automconfig.json");
json j = {
json j = {
{"editor", editor},
{"search_dirs", {home}},
{"autom_home_dir", home}
};
{"autom_home_dir", home}};
file << j.dump(4);
file.close();
}
void runSetup()