From 405afe4e316289a249c101793a1f476ceb73a91c Mon Sep 17 00:00:00 2001 From: Martchus Date: Wed, 13 Jun 2018 00:40:16 +0200 Subject: [PATCH] Make Field default-constructable --- io/entry.cpp | 1 + io/field.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/io/entry.cpp b/io/entry.cpp index 28a0bd7..edd327b 100644 --- a/io/entry.cpp +++ b/io/entry.cpp @@ -136,6 +136,7 @@ void Entry::setParent(NodeEntry *parent, int index) /*! * \brief Returns an indication whether the instance is an indirect child of the specified \a entry. + * \todo Make \a entry const in v4. */ bool Entry::isIndirectChildOf(NodeEntry *entry) const { diff --git a/io/field.h b/io/field.h index 97df2cb..da041b8 100644 --- a/io/field.h +++ b/io/field.h @@ -14,6 +14,7 @@ class AccountEntry; class PASSWORD_FILE_EXPORT Field { public: + Field(); Field(AccountEntry *tiedAccount, const std::string &name = std::string(), const std::string &value = std::string()); Field(AccountEntry *tiedAccount, std::istream &stream); @@ -38,6 +39,12 @@ protected: std::string m_extendedData; }; +inline Field::Field() + : m_type(FieldType::Normal) + , m_tiedAccount(nullptr) +{ +} + /*! * \brief Returns an indication whether the entry is empty. */