From e044fc4255aa64ef1dbc3d20ed87ed6e2f61a6bd Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 9 May 2021 19:01:59 -0400 Subject: Code refactoring --- src/item.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/item.h') diff --git a/src/item.h b/src/item.h index b0b06af..fc43a40 100644 --- a/src/item.h +++ b/src/item.h @@ -1,5 +1,5 @@ #pragma once -#include "json.hpp" +#include #include "entry.h" #include @@ -8,17 +8,13 @@ namespace entry { public: static std::shared_ptr create(const nlohmann::json& data); virtual ~Item() {} - - protected: - Item(const nlohmann::json& data) : Entry(data) {} }; class Substantial { public: virtual int getCost(void) const = 0; virtual double getWeight(void) const = 0; + std::string getText() const; virtual ~Substantial() {} }; - - std::string genText(const Substantial& s); } -- cgit v1.2.3