Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments, style. #1462

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/bitcoin/system/impl/data/data_slab.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,11 @@ template <data_slab::size_type Size>
constexpr std::array<data_slab::value_type, Size>
data_slab::to_array() const NOEXCEPT
{
std::array<data_slab::value_type, Size> out;
std::array<data_slab::value_type, Size> out{};

// Array operator safely iterates and emits zeros past end.
for (size_type index = 0; index < Size; ++index)
{
// Array operator safely iterates and emits zeros past end.
BC_PUSH_WARNING(NO_DYNAMIC_ARRAY_INDEXING)
out[index] = (*this)[index];
BC_POP_WARNING()
Expand Down
4 changes: 2 additions & 2 deletions include/bitcoin/system/impl/data/data_slice.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ template <data_slice::size_type Size>
std::array<data_slice::value_type, Size>
constexpr data_slice::to_array() const NOEXCEPT
{
std::array<data_slice::value_type, Size> out;
std::array<data_slice::value_type, Size> out{};

// Array operator safely iterates and emits zeros past end.
for (size_type index = 0; index < Size; ++index)
{
// Array operator safely iterates and emits zeros past end.
BC_PUSH_WARNING(NO_DYNAMIC_ARRAY_INDEXING)
out[index] = (*this)[index];
BC_POP_WARNING()
Expand Down
Loading