From 2a9f262e6db5906db445d465e500d7ba8c90fab3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 5 May 2021 09:44:50 -0400 Subject: Implemented additional commands --- src/entry.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/entry.h') 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; -- cgit v1.2.3