Fix even more Clang warnings.
This patch disables shift-sign-overflow warnings for now. It also fixes most -Wfloat-equal warnings and -Wextra-semi warnings. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1454,7 +1454,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<float>
|
||||
size_t operator()(float __v) const _NOEXCEPT
|
||||
{
|
||||
// -0.0 and 0.0 should return same hash
|
||||
if (__v == 0)
|
||||
if (__v == 0.0)
|
||||
return 0;
|
||||
return __scalar_hash<float>::operator()(__v);
|
||||
}
|
||||
@@ -1468,7 +1468,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<double>
|
||||
size_t operator()(double __v) const _NOEXCEPT
|
||||
{
|
||||
// -0.0 and 0.0 should return same hash
|
||||
if (__v == 0)
|
||||
if (__v == 0.0)
|
||||
return 0;
|
||||
return __scalar_hash<double>::operator()(__v);
|
||||
}
|
||||
@@ -1482,7 +1482,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<long double>
|
||||
size_t operator()(long double __v) const _NOEXCEPT
|
||||
{
|
||||
// -0.0 and 0.0 should return same hash
|
||||
if (__v == 0)
|
||||
if (__v == 0.0)
|
||||
return 0;
|
||||
#if defined(__i386__)
|
||||
// Zero out padding bits
|
||||
|
||||
Reference in New Issue
Block a user