CAccountingEntry : Add initializers, remove SetNull method.
authorCryptoManiac <balthazar@yandex.ru>
Mon, 2 May 2016 22:07:07 +0000 (01:07 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Mon, 2 May 2016 22:07:07 +0000 (01:07 +0300)
src/wallet.h

index 20cd9af..87adeb2 100644 (file)
@@ -592,29 +592,16 @@ public:
 class CAccountingEntry
 {
 public:
-    std::string strAccount;
-    int64_t nCreditDebit;
-    int64_t nTime;
-    std::string strOtherAccount;
-    std::string strComment;
+    std::string strAccount = "";
+    int64_t nCreditDebit = 0;
+    int64_t nTime = 0;
+    std::string strOtherAccount = "";
+    std::string strComment = "";
     mapValue_t mapValue;
-    int64_t nOrderPos;  // position in ordered transaction list
-    uint64_t nEntryNo;
-
-    CAccountingEntry()
-    {
-        SetNull();
-    }
+    int64_t nOrderPos = -1;  // position in ordered transaction list
+    uint64_t nEntryNo = 0;
 
-    void SetNull()
-    {
-        nCreditDebit = 0;
-        nTime = 0;
-        strAccount.clear();
-        strOtherAccount.clear();
-        strComment.clear();
-        nOrderPos = -1;
-    }
+    CAccountingEntry() { }
 
     IMPLEMENT_SERIALIZE
     (