[libcxx-commits] [libcxx] [libc++] Remove redundant assignments in bitset string-like constructors (PR #121424)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 12 08:28:33 PST 2025


https://github.com/winner245 updated https://github.com/llvm/llvm-project/pull/121424

>From 52b486da705b0a6c295c9f4bbb3f107d3efd45ae Mon Sep 17 00:00:00 2001
From: Peng Liu <winner245 at hotmail.com>
Date: Tue, 31 Dec 2024 23:46:50 -0500
Subject: [PATCH] Remove unnecessary zero-assignments in bitset string-like
 constructors

---
 libcxx/include/bitset | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index a20842985b3d5..3cd4312e0171d 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -736,7 +736,6 @@ private:
       _CharT __c   = __str[__mp - 1 - __i];
       (*this)[__i] = _Traits::eq(__c, __one);
     }
-    std::fill(__base::__make_iter(__i), __base::__make_iter(_Size), false);
   }
 
   _LIBCPP_HIDE_FROM_ABI size_t __hash_code() const _NOEXCEPT { return __base::__hash_code(); }



More information about the libcxx-commits mailing list