Skip to content

Commit

Permalink
Fix sign conversion error (issue 71)
Browse files Browse the repository at this point in the history
  • Loading branch information
skeetsaz committed Oct 23, 2023
1 parent 6989717 commit 0e6b547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cetl/variable_length_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@ class VariableLengthArray<bool, Allocator> : protected VariableLengthArrayBase<u
if (size_ > 0)
{
const Storage existing_byte = data_[size_ - 1];
const std::size_t bit_size_delta = 8U - (last_byte_bit_fill_ + 1);
const std::size_t bit_size_delta = 8U - (last_byte_bit_fill_ + 1U);
const Storage existing_bits_mask = static_cast<Storage>((1U << (last_byte_bit_fill_ + 1U)) - 1U);
if (value)
{
Expand Down Expand Up @@ -2420,7 +2420,7 @@ class VariableLengthArray<bool, Allocator> : protected VariableLengthArrayBase<u
CETL_DEBUG_ASSERT(size_ <= capacity_, "CDE_vla_002: size_ is out of range.");
CETL_DEBUG_ASSERT(size_ != 0 || last_byte_bit_fill_ == 0,
"CDE_vla_003: last_byte_bit_fill_ should always be zero when size_ is.");
return (size_ == 0) ? 0 : ((size_ - 1) * 8U) + (last_byte_bit_fill_ + 1);
return (size_ == 0) ? 0 : ((size_ - 1) * 8U) + (last_byte_bit_fill_ + 1U);
}

constexpr size_type capacity_bits() const noexcept
Expand Down

0 comments on commit 0e6b547

Please sign in to comment.