summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-29 06:43:31 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-29 06:43:31 +0100
commitfd70f20ecf6417f6805c32fcd18844276024b38b (patch)
tree6da4efff0c6893ce7a0316b2471818d2030c61a6
parent1f6eba7bd4b7fc0c5be04f073396b7594a7681c6 (diff)
fix: rope_fwd.inl: implementation hardening.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
-rw-r--r--include/ocl/tproc/detail/rope_fwd.inl10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/ocl/tproc/detail/rope_fwd.inl b/include/ocl/tproc/detail/rope_fwd.inl
index 6951b20..e5d959e 100644
--- a/include/ocl/tproc/detail/rope_fwd.inl
+++ b/include/ocl/tproc/detail/rope_fwd.inl
@@ -14,7 +14,7 @@ namespace ocl::tproc
{
private:
std::allocator_traits<Allocator>::size_type size_;
- CharT *head_, tail_{};
+ CharT *head_, *tail_{};
public:
std::allocator_traits<Allocator>::size_type size()
@@ -45,7 +45,7 @@ namespace ocl::tproc
basic_rope<CharT, Traits, Allocator>::operator=(
basic_rope<CharT, Traits, Allocator>&& other)
{
- impl_ = std::exchange(other.impl_);
+ impl_ = std::exchange(other.impl_, nullptr);
return *this;
}
@@ -53,21 +53,21 @@ namespace ocl::tproc
basic_rope<CharT, Traits, Allocator>::basic_rope(
basic_rope<CharT, Traits, Allocator>&& other)
{
- impl_ = std::exchange(other.impl_);
+ impl_ = std::exchange(other.impl_, nullptr);
}
template <class CharT, class Traits, class Allocator>
basic_rope<CharT, Traits, Allocator>&
basic_rope<CharT, Traits, Allocator>::operator=(basic_rope&& other)
{
- impl_ = std::exchange(other.impl_);
+ impl_ = std::exchange(other.impl_, nullptr);
return *this;
}
template <class CharT, class Traits, class Allocator>
basic_rope<CharT, Traits, Allocator>::basic_rope(basic_rope&& other)
{
- impl_ = std::exchange(other.impl_);
+ impl_ = std::exchange(other.impl_, nullptr);
}
template <class CharT, class Traits, class Allocator>