Skip to content

Commit 24b27c8

Browse files
committed
chore: change From and To to T and XType respectively
Signed-off-by: krishna2803 <[email protected]>
1 parent e98d4e2 commit 24b27c8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libc/src/__support/fixed_point/fx_bits.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ bit_and(T x, T y) {
121121
using BitType = typename FXRep<T>::StorageType;
122122
BitType x_bit = cpp::bit_cast<BitType>(x);
123123
BitType y_bit = cpp::bit_cast<BitType>(y);
124-
// For some reason, bit_cast cannot deduce BitType from the input.
124+
// For some reason, bit_cast cannot deduce BitType T the input.
125125
return cpp::bit_cast<T, BitType>(x_bit & y_bit);
126126
}
127127

@@ -131,7 +131,7 @@ bit_or(T x, T y) {
131131
using BitType = typename FXRep<T>::StorageType;
132132
BitType x_bit = cpp::bit_cast<BitType>(x);
133133
BitType y_bit = cpp::bit_cast<BitType>(y);
134-
// For some reason, bit_cast cannot deduce BitType from the input.
134+
// For some reason, bit_cast cannot deduce BitType T the input.
135135
return cpp::bit_cast<T, BitType>(x_bit | y_bit);
136136
}
137137

@@ -140,7 +140,7 @@ LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_fixed_point_v<T>, T>
140140
bit_not(T x) {
141141
using BitType = typename FXRep<T>::StorageType;
142142
BitType x_bit = cpp::bit_cast<BitType>(x);
143-
// For some reason, bit_cast cannot deduce BitType from the input.
143+
// For some reason, bit_cast cannot deduce BitType T the input.
144144
return cpp::bit_cast<T, BitType>(static_cast<BitType>(~x_bit));
145145
}
146146

@@ -195,10 +195,10 @@ countls(T f) {
195195
}
196196

197197
// fixed-point to integer conversion
198-
template <typename From, typename To>
199-
LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_fixed_point_v<From>, To>
200-
bitsfx(From f) {
201-
return cpp::bit_cast<To, From>(f);
198+
template <typename T, typename XType>
199+
LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_fixed_point_v<T>, XType>
200+
bitsfx(T f) {
201+
return cpp::bit_cast<XType, T>(f);
202202
}
203203

204204
} // namespace fixed_point

0 commit comments

Comments
 (0)