File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,15 @@ class CDataStream;
19
19
class CBanEntry
20
20
{
21
21
public:
22
- static const int CURRENT_VERSION= 1 ;
23
- int nVersion;
24
- int64_t nCreateTime;
25
- int64_t nBanUntil;
22
+ static constexpr int CURRENT_VERSION{ 1 } ;
23
+ int nVersion{CBanEntry::CURRENT_VERSION} ;
24
+ int64_t nCreateTime{ 0 } ;
25
+ int64_t nBanUntil{ 0 } ;
26
26
27
- CBanEntry ()
28
- {
29
- SetNull ();
30
- }
27
+ CBanEntry () {}
31
28
32
29
explicit CBanEntry (int64_t nCreateTimeIn)
33
- {
34
- SetNull ();
35
- nCreateTime = nCreateTimeIn;
36
- }
30
+ : nCreateTime{nCreateTimeIn} {}
37
31
38
32
/* *
39
33
* Create a ban entry from JSON.
@@ -42,13 +36,6 @@ class CBanEntry
42
36
*/
43
37
explicit CBanEntry (const UniValue& json);
44
38
45
- void SetNull ()
46
- {
47
- nVersion = CBanEntry::CURRENT_VERSION;
48
- nCreateTime = 0 ;
49
- nBanUntil = 0 ;
50
- }
51
-
52
39
/* *
53
40
* Generate a JSON representation of this ban entry.
54
41
* @return JSON suitable for passing to the `CBanEntry(const UniValue&)` constructor.
You can’t perform that action at this time.
0 commit comments