Skip to content

Commit 3c062b9

Browse files
committed
refactor: remove redundant if-else
Signed-off-by: Krishna Pandey <[email protected]>
1 parent 92cdc99 commit 3c062b9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libc/src/__support/FPUtil/BasicOperations.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,7 @@ LIBC_INLINE cpp::enable_if_t<cpp::is_floating_point_v<T>, T> getpayload(T x) {
354354

355355
return static_cast<T>(payload_dfloat);
356356
} else {
357-
if constexpr (cpp::is_same_v<T, bfloat16>)
358-
return T(static_cast<int>(payload));
359-
else
360-
return static_cast<T>(payload);
357+
return static_cast<T>(payload);
361358
}
362359
}
363360

0 commit comments

Comments
 (0)