mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix wrong code (amend)
This commit is contained in:
parent
35aba776e5
commit
8940677bf2
@ -1127,12 +1127,8 @@ constexpr integer<Bits, Signed>::operator T() const noexcept
|
||||
using UnsignedT = std::make_unsigned_t<T>;
|
||||
|
||||
UnsignedT res{};
|
||||
for (unsigned i = 0; i < _impl::item_count; ++i)
|
||||
{
|
||||
if constexpr (sizeof(T) > sizeof(base_type))
|
||||
res <<= (sizeof(base_type) * 8);
|
||||
res += items[i];
|
||||
}
|
||||
for (unsigned i = 0; i < _impl::item_count && i <= sizeof(T) / sizeof(base_type); ++i)
|
||||
res += UnsignedT(items[i]) << (sizeof(base_type) * 8 * i);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user