@@ -128,7 +128,7 @@ hd_private hd_private::from_entropy(const data_slice& entropy,
128128 static const auto magic = to_chunk (" Bitcoin seed" );
129129 const auto intermediate = split (hmac<sha512>::code (entropy, magic));
130130
131- return hd_private ( intermediate.first , intermediate.second , prefixes) ;
131+ return { intermediate.first , intermediate.second , prefixes } ;
132132}
133133
134134hd_private hd_private::from_key (const hd_key& key,
@@ -162,7 +162,7 @@ hd_private hd_private::from_key(const hd_key& key, uint64_t prefixes) NOEXCEPT
162162 child
163163 };
164164
165- return hd_private ( secret, chain, lineage) ;
165+ return { secret, chain, lineage } ;
166166}
167167
168168hd_private hd_private::from_string (const std::string& encoded,
@@ -231,8 +231,8 @@ hd_key hd_private::to_hd_key() const NOEXCEPT
231231
232232hd_public hd_private::to_public () const NOEXCEPT
233233{
234- return hd_public (((hd_public) *this ).to_hd_key (),
235- hd_public::to_prefix (lineage_.prefixes )) ;
234+ const auto key = static_cast < hd_public>( *this ).to_hd_key ();
235+ return { key, hd_public::to_prefix (lineage_.prefixes ) } ;
236236}
237237
238238hd_private hd_private::derive_private (uint32_t index) const NOEXCEPT
@@ -261,7 +261,7 @@ hd_private hd_private::derive_private(uint32_t index) const NOEXCEPT
261261 index
262262 };
263263
264- return hd_private ( child, intermediate.second , lineage) ;
264+ return { child, intermediate.second , lineage } ;
265265}
266266
267267hd_public hd_private::derive_public (uint32_t index) const NOEXCEPT
0 commit comments