Skip to content

Commit

Permalink
Correction of 6229
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Dec 21, 2023
1 parent 1a27d15 commit f14874a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 2023-12-21 07:23:40+00:00 - build 6230

1. Correction of 6229.

--------------------------------------------------------------------------------
drkns 2023-12-21 00:38:58+00:00 - build 6229

Expand Down
10 changes: 2 additions & 8 deletions far/common/smart_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,10 @@ class block_ptr: public array_ptr<std::byte, Size>
[[nodiscard]]
auto data() const noexcept
{
assert(size());
assert(this->size() >= sizeof(T));
return edit_as<T*>(base::data());
}

[[nodiscard]]
auto size() const noexcept
{
return base::size() / sizeof(T);
}

[[nodiscard]]
auto begin() const noexcept
{
Expand All @@ -194,7 +188,7 @@ class block_ptr: public array_ptr<std::byte, Size>
[[nodiscard]]
auto end() const noexcept
{
return begin() + size();
return begin() + this->size() / sizeof(T);
}

[[nodiscard]]
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6229
6230

0 comments on commit f14874a

Please sign in to comment.