diff options
Diffstat (limited to 'src/entry.h')
-rw-r--r-- | src/entry.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/entry.h b/src/entry.h index e354c82..ced8544 100644 --- a/src/entry.h +++ b/src/entry.h @@ -36,7 +36,9 @@ namespace entry { } protected: - Entry(const nlohmann::json& data) : entry(data["entry"]), name(data["name"]), type(data["type"]), text(data["text"]) {}; + Entry(const nlohmann::json& data) : Entry(data["entry"], data["name"], data["type"], data["text"]) {}; + // Can also be instantiated programmatically + Entry(const std::string& entry, const std::string& name, const std::string& type, const std::string& text) : entry(entry), name(name), type(type), text(text) {}; private: const std::string entry; |