Commit 28c208fc authored by jschuh's avatar jschuh Committed by Commit bot

Revert of Remove bad comment in HasSignBit (patchset #1 id:1 of...

Revert of Remove bad comment in HasSignBit (patchset #1 id:1 of https://codereview.chromium.org/2562643005/ )

Reason for revert:
The original change was not actually a performance improvement.

Original issue's description:
> Remove bad comment in HasSignBit
>
> Remove a bad comment left behind from crrev.com/437342
> TBR=scottmg
> R=scottmg
> NOTRY=true
>
> Committed: https://crrev.com/6b15c686879f6747935a517f74f579f7ae46d797
> Cr-Commit-Position: refs/heads/master@{#437416}

TBR=scottmg@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2559183004
Cr-Commit-Position: refs/heads/master@{#437579}
parent 172d35b3
......@@ -46,6 +46,7 @@ struct UnsignedOrFloatForSize<Numeric, false, true> {
template <typename T>
constexpr bool HasSignBit(T x) {
// Cast to unsigned since right shift on signed is undefined.
return static_cast<typename std::make_signed<T>::type>(x) <
static_cast<typename std::make_signed<T>::type>(0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment