Wallet: Add CAddressBookData::IsChange which returns true iff label has never been set

This commit is contained in:
Luke Dashjr 2020-02-22 02:04:27 +00:00
parent 144b2f85da
commit 65b6bdc2b1

View file

@ -182,6 +182,7 @@ public:
class CAddressBookData class CAddressBookData
{ {
private: private:
bool m_change{true};
std::string m_label; std::string m_label;
public: public:
const std::string& name; const std::string& name;
@ -192,7 +193,9 @@ public:
typedef std::map<std::string, std::string> StringMap; typedef std::map<std::string, std::string> StringMap;
StringMap destdata; StringMap destdata;
bool IsChange() const { return m_change; }
void SetLabel(const std::string& label) { void SetLabel(const std::string& label) {
m_change = false;
m_label = label; m_label = label;
} }
}; };