File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 18
18
typedef std::vector<unsigned char > valtype;
19
19
20
20
ScriptHash::ScriptHash (const CScript& in) : BaseHash(Hash160(in)) {}
21
- ScriptHash::ScriptHash (const CScriptID& in) : BaseHash( static_cast <uint160>(in)) {}
21
+ ScriptHash::ScriptHash (const CScriptID& in) : BaseHash{in} {}
22
22
23
23
PKHash::PKHash (const CPubKey& pubkey) : BaseHash(pubkey.GetID()) {}
24
24
PKHash::PKHash (const CKeyID& pubkey_id) : BaseHash(pubkey_id) {}
25
25
26
26
WitnessV0KeyHash::WitnessV0KeyHash (const CPubKey& pubkey) : BaseHash(pubkey.GetID()) {}
27
- WitnessV0KeyHash::WitnessV0KeyHash (const PKHash& pubkey_hash) : BaseHash( static_cast <uint160>( pubkey_hash)) {}
27
+ WitnessV0KeyHash::WitnessV0KeyHash (const PKHash& pubkey_hash) : BaseHash{ pubkey_hash} {}
28
28
29
29
CKeyID ToKeyID (const PKHash& key_hash)
30
30
{
31
- return CKeyID{static_cast < uint160>( key_hash) };
31
+ return CKeyID{uint160{ key_hash} };
32
32
}
33
33
34
34
CKeyID ToKeyID (const WitnessV0KeyHash& key_hash)
35
35
{
36
- return CKeyID{static_cast < uint160>( key_hash) };
36
+ return CKeyID{uint160{ key_hash} };
37
37
}
38
38
39
39
CScriptID ToScriptID (const ScriptHash& script_hash)
40
40
{
41
- return CScriptID{static_cast < uint160>( script_hash) };
41
+ return CScriptID{uint160{ script_hash} };
42
42
}
43
43
44
44
WitnessV0ScriptHash::WitnessV0ScriptHash (const CScript& in)
You can’t perform that action at this time.
0 commit comments