Skip to content

Commit

Permalink
Fix dependent lookup of a base memberr
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoritzinsky committed Oct 10, 2024
1 parent 0b64bf1 commit 88867c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/interfaces/signatures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct base_inline_span : public span<T>

base_inline_span& operator=(base_inline_span&& other) noexcept
{
if (size() > NumInlineElements)
if (this->size() > NumInlineElements)
{
delete[] this->_ptr;
this->_ptr = nullptr;
Expand All @@ -51,19 +51,19 @@ struct base_inline_span : public span<T>

void resize(size_t newSize)
{
if (size() > NumInlineElements && newSize < NumInlineElements)
if (this->size() > NumInlineElements && newSize < NumInlineElements)
{
// Transitioning from a non-inline buffer to the inline buffer.
std::copy(this->begin(), this->begin() + newSize, _storage.begin());
delete[] this->_ptr;
this->_ptr = _storage.data();
}
else if (size() <= NumInlineElements && newSize <= NumInlineElements)
else if (this->size() <= NumInlineElements && newSize <= NumInlineElements)
{
// We're staying within the inline buffer, so just update the size.
this->_size = newSize;
}
else if (size() > NumInlineElements && newSize < size())
else if (this->size() > NumInlineElements && newSize < this->size())
{
// Shrinking the buffer, but still keeping it as a non-inline buffer.
this->_size = newSize;
Expand All @@ -81,7 +81,7 @@ struct base_inline_span : public span<T>

~base_inline_span()
{
if (size() > NumInlineElements)
if (this->size() > NumInlineElements)
{
assert(this->_ptr != _storage.data());
delete[] this->_ptr;
Expand Down

0 comments on commit 88867c2

Please sign in to comment.