summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHui <hui.xie0621@gmail.com>2024-03-01 19:50:55 +0000
committerHui <hui.xie0621@gmail.com>2024-03-01 19:52:14 +0000
commit1a0c988ebddd83bd34393a1500b5f3ce80888fbc (patch)
tree7705c31af780066c94fbd4752de4fbad503605b0
parenta490bbf5391de358ad400a23ae8e9ed494e5004e (diff)
[libc++][NFC] rename variable in atomic_sync
As discussed in https://github.com/llvm/llvm-project/pull/81427/files#r1509266817 rename the variable as a separate commit
-rw-r--r--libcxx/include/__atomic/atomic_sync.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h
index d07b35878493..2997bad83344 100644
--- a/libcxx/include/__atomic/atomic_sync.h
+++ b/libcxx/include/__atomic/atomic_sync.h
@@ -137,9 +137,9 @@ _LIBCPP_HIDE_FROM_ABI bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp c
template <class _Tp>
struct __atomic_compare_unequal_to {
- _Tp __val;
- _LIBCPP_HIDE_FROM_ABI bool operator()(_Tp& __current_val) const {
- return !std::__cxx_nonatomic_compare_equal(__current_val, __val);
+ _Tp __val_;
+ _LIBCPP_HIDE_FROM_ABI bool operator()(const _Tp& __arg) const {
+ return !std::__cxx_nonatomic_compare_equal(__arg, __val_);
}
};