mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Clear signed/unsigned warnings under Clang
This commit is contained in:
parent
1da81ae454
commit
f6ff499035
44
misc.h
44
misc.h
@ -1531,9 +1531,9 @@ template <unsigned int R, class T> inline T rotlConstant(T x)
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157,
|
||||
// http://software.intel.com/en-us/forums/topic/580884
|
||||
// and http://llvm.org/bugs/show_bug.cgi?id=24226
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_ASSERT(R < THIS_SIZE);
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
CRYPTOPP_ASSERT(static_cast<int>(R) < THIS_SIZE);
|
||||
return T((x<<R)|(x>>(-R&MASK)));
|
||||
}
|
||||
|
||||
@ -1557,9 +1557,9 @@ template <unsigned int R, class T> inline T rotrConstant(T x)
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157,
|
||||
// http://software.intel.com/en-us/forums/topic/580884
|
||||
// and http://llvm.org/bugs/show_bug.cgi?id=24226
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_ASSERT(R < THIS_SIZE);
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
CRYPTOPP_ASSERT(static_cast<int>(R) < THIS_SIZE);
|
||||
return T((x >> R)|(x<<(-R&MASK)));
|
||||
}
|
||||
|
||||
@ -1582,9 +1582,9 @@ template <class T> inline T rotlFixed(T x, unsigned int y)
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157,
|
||||
// http://software.intel.com/en-us/forums/topic/580884
|
||||
// and http://llvm.org/bugs/show_bug.cgi?id=24226
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_ASSERT(y < THIS_SIZE);
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
CRYPTOPP_ASSERT(static_cast<int>(y) < THIS_SIZE);
|
||||
return T((x<<y)|(x>>(-y&MASK)));
|
||||
}
|
||||
|
||||
@ -1607,9 +1607,9 @@ template <class T> inline T rotrFixed(T x, unsigned int y)
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157,
|
||||
// http://software.intel.com/en-us/forums/topic/580884
|
||||
// and http://llvm.org/bugs/show_bug.cgi?id=24226
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_ASSERT(y < THIS_SIZE);
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
CRYPTOPP_ASSERT(static_cast<int>(y) < THIS_SIZE);
|
||||
return T((x >> y)|(x<<(-y&MASK)));
|
||||
}
|
||||
|
||||
@ -1627,9 +1627,9 @@ template <class T> inline T rotrFixed(T x, unsigned int y)
|
||||
/// \since Crypto++ 3.0
|
||||
template <class T> inline T rotlVariable(T x, unsigned int y)
|
||||
{
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_ASSERT(y < THIS_SIZE);
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
CRYPTOPP_ASSERT(static_cast<int>(y) < THIS_SIZE);
|
||||
return T((x<<y)|(x>>(-y&MASK)));
|
||||
}
|
||||
|
||||
@ -1647,9 +1647,9 @@ template <class T> inline T rotlVariable(T x, unsigned int y)
|
||||
/// \since Crypto++ 3.0
|
||||
template <class T> inline T rotrVariable(T x, unsigned int y)
|
||||
{
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_ASSERT(y < THIS_SIZE);
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
CRYPTOPP_ASSERT(static_cast<int>(y) < THIS_SIZE);
|
||||
return T((x>>y)|(x<<(-y&MASK)));
|
||||
}
|
||||
|
||||
@ -1664,8 +1664,8 @@ template <class T> inline T rotrVariable(T x, unsigned int y)
|
||||
/// \since Crypto++ 3.0
|
||||
template <class T> inline T rotlMod(T x, unsigned int y)
|
||||
{
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
return T((x<<(y&MASK))|(x>>(-y&MASK)));
|
||||
}
|
||||
|
||||
@ -1680,8 +1680,8 @@ template <class T> inline T rotlMod(T x, unsigned int y)
|
||||
/// \since Crypto++ 3.0
|
||||
template <class T> inline T rotrMod(T x, unsigned int y)
|
||||
{
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8)
;
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1)
;
|
||||
CRYPTOPP_CONSTANT(THIS_SIZE = sizeof(T)*8);
|
||||
CRYPTOPP_CONSTANT(MASK = THIS_SIZE-1);
|
||||
return T((x>>(y&MASK))|(x<<(-y&MASK)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user