mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
bindings.toml, config/bindings.toml file
This commit is contained in:
parent
7fdacffe53
commit
66476ee642
11 changed files with 79 additions and 31 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "../coders/commons.hpp"
|
||||
#include "../coders/json.hpp"
|
||||
#include "../coders/toml.hpp"
|
||||
#include "../coders/gzip.hpp"
|
||||
#include "../util/stringutil.hpp"
|
||||
#include "../data/dynamic.hpp"
|
||||
|
|
@ -121,6 +122,10 @@ std::shared_ptr<dynamic::Map> files::read_binary_json(fs::path file) {
|
|||
return json::from_binary(bytes.get(), size);
|
||||
}
|
||||
|
||||
std::shared_ptr<dynamic::Map> files::read_toml(fs::path file) {
|
||||
return toml::parse(file.u8string(), files::read_string(file));
|
||||
}
|
||||
|
||||
std::vector<std::string> files::read_list(fs::path filename) {
|
||||
std::ifstream file(filename);
|
||||
if (!file) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue