Skip to content

Commit 2eb9280

Browse files
committed
Style.
1 parent 27ff4cd commit 2eb9280

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/wallet/keys/hd_private.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

134134
hd_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

168168
hd_private hd_private::from_string(const std::string& encoded,
@@ -231,8 +231,8 @@ hd_key hd_private::to_hd_key() const NOEXCEPT
231231

232232
hd_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

238238
hd_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

267267
hd_public hd_private::derive_public(uint32_t index) const NOEXCEPT

src/wallet/keys/hd_public.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ hd_public hd_public::from_key(const hd_key& key, uint32_t prefix) NOEXCEPT
132132
child
133133
};
134134

135-
return hd_public(compressed, chain, lineage);
135+
return { compressed, chain, lineage };
136136
}
137137

138138
hd_public hd_public::from_string(const std::string& encoded,
@@ -142,7 +142,7 @@ hd_public hd_public::from_string(const std::string& encoded,
142142
if (!decode_base58(key, encoded))
143143
return {};
144144

145-
return hd_public(from_key(key, prefix));
145+
return { from_key(key, prefix) };
146146
}
147147

148148
// Cast operators.
@@ -227,7 +227,7 @@ hd_public hd_public::derive_public(uint32_t index) const NOEXCEPT
227227
index
228228
};
229229

230-
return hd_public(child, intermediate.second, lineage);
230+
return { child, intermediate.second, lineage };
231231
}
232232

233233
// Helpers.

0 commit comments

Comments
 (0)