diff options
author | Your Name <you@example.com> | 2021-05-09 19:01:59 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-09 19:01:59 -0400 |
commit | e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd (patch) | |
tree | 344c09421c5839a764a132fe9166f0e6e3f90e45 /src/feature.cc | |
parent | d13358b71ec15085f2638fd9c3fc634df62dfc94 (diff) | |
download | dmtool-e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd.tar.gz dmtool-e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd.tar.bz2 dmtool-e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd.zip |
Code refactoring
Diffstat (limited to 'src/feature.cc')
-rw-r--r-- | src/feature.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/feature.cc b/src/feature.cc index c42aba2..941de4e 100644 --- a/src/feature.cc +++ b/src/feature.cc @@ -1,16 +1,14 @@ -#include "json.hpp" #include "feature.h" #include "spellcasting.h" #include "attack.h" #include "utils.h" -#include <sstream> -#include <map> +#include <nlohmann/json.hpp> +#include <memory> using namespace std; -typedef nlohmann::json json; namespace entry { - shared_ptr<Feature> Feature::create(const json& data) { + shared_ptr<Feature> Feature::create(const nlohmann::json& data) { if(data["type"] == "spells") { return utils::loadDFromJson<Feature, Spellcasting>(data); } else if(data["type"] == "attack") { |