diff options
author | Aki <please@ignore.pl> | 2024-03-19 22:56:52 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2024-03-19 22:56:52 +0100 |
commit | f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4 (patch) | |
tree | bbcfc73dd8db75579127686f9cd07e9c45d374d0 /StarsEx/Campaign.cpp | |
parent | 2066e4911948d11cac5a234d2f7773dc5f06ba96 (diff) | |
download | starshatter-f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4.zip starshatter-f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4.tar.gz starshatter-f5b8091ee91b8323b8e2b1044ba8be676f2bfaf4.tar.bz2 |
Definition Parser now consumes from the new Reader
Next steps are to move ParseUtils functionality to DefinitinoEx, sort
things into the namespaces in this library, and then prepare it to
handle overloading like nlohmann_json does. On the other side, it's
time for starshatter::data.
Diffstat (limited to 'StarsEx/Campaign.cpp')
-rw-r--r-- | StarsEx/Campaign.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/StarsEx/Campaign.cpp b/StarsEx/Campaign.cpp index 63c9e3b..70846f0 100644 --- a/StarsEx/Campaign.cpp +++ b/StarsEx/Campaign.cpp @@ -432,7 +432,7 @@ Campaign::LoadCampaign(DataLoader* loader, bool full) loader->UseFileSystem(true); loader->LoadBuffer(filename, block, true); loader->UseFileSystem(Starshatter::UseFileSystem()); - Parser parser(new BlockReader((const char*) block)); + Parser parser(starshatter::foundation::Reader{reinterpret_cast<const char*>(block)}); Term* term = parser.ParseTerm(); @@ -970,7 +970,7 @@ Campaign::LoadMissionList(DataLoader* loader) loader->UseFileSystem(true); loader->LoadBuffer(filename, block, true); loader->UseFileSystem(Starshatter::UseFileSystem()); - Parser parser(new BlockReader((const char*) block)); + Parser parser(starshatter::foundation::Reader{reinterpret_cast<const char*>(block)}); Term* term = parser.ParseTerm(); @@ -1112,7 +1112,7 @@ Campaign::LoadCustomMissions(DataLoader* loader) int type = 0; int msn_id = 0; - Parser parser(new BlockReader((const char*) block)); + Parser parser(starshatter::foundation::Reader{reinterpret_cast<const char*>(block)}); Term* term = parser.ParseTerm(); if (!term) { @@ -1225,7 +1225,7 @@ Campaign::LoadTemplateList(DataLoader* loader) loader->UseFileSystem(true); loader->LoadBuffer(filename, block, true); loader->UseFileSystem(Starshatter::UseFileSystem()); - Parser parser(new BlockReader((const char*) block)); + Parser parser(starshatter::foundation::Reader{reinterpret_cast<const char*>(block)}); Term* term = parser.ParseTerm(); |