toml::Wrapper removed

This commit is contained in:
MihailRis
2024-04-28 17:23:52 +03:00
parent 184ecd88ba
commit c3b5576c02
22 changed files with 795 additions and 965 deletions
+4 -4
View File
@@ -118,8 +118,8 @@ std::string json::stringify(
return ss.str();
}
Parser::Parser(std::string filename, std::string source)
: BasicParser(filename, source) {
Parser::Parser(const std::string& filename, const std::string& source)
: BasicParser(filename, source) {
}
Map* Parser::parse() {
@@ -244,11 +244,11 @@ Value* Parser::parseValue() {
throw error("unexpected character '"+std::string({next})+"'");
}
std::unique_ptr<Map> json::parse(std::string filename, std::string source) {
std::unique_ptr<Map> json::parse(const std::string& filename, const std::string& source) {
Parser parser(filename, source);
return std::unique_ptr<Map>(parser.parse());
}
std::unique_ptr<Map> json::parse(std::string source) {
std::unique_ptr<Map> json::parse(const std::string& source) {
return parse("<string>", source);
}