summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-12-28 21:32:29 -0500
committerJeffrey Walton <noloader@gmail.com>2020-12-28 21:32:29 -0500
commit9fe5ccfbeed3c3c48b6e1d42e4abb64d11662527 (patch)
tree394ab7fac4eb060ca9ba33ce0a614d9e2733f827 /misc.h
parent3edaf67b345ab803c9a7a743b66c72c42772d23e (diff)
downloadcryptopp-git-9fe5ccfbeed3c3c48b6e1d42e4abb64d11662527.tar.gz
Revert e235ac57e85b (GH #992)
These damn aligned arrays are going to be the death of us...
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/misc.h b/misc.h
index 83bf49ec..5f9e6eed 100644
--- a/misc.h
+++ b/misc.h
@@ -1212,15 +1212,14 @@ inline bool IsAlignedOn(const void *ptr, unsigned int alignment)
/// \brief Determines whether ptr is minimally aligned
/// \tparam T class or type
/// \param ptr the pointer to check for alignment
-/// \return true if <tt>ptr</tt> is aligned to at least a pointer to <tt>T</tt>
+/// \return true if <tt>ptr</tt> is aligned to at least <tt>T</tt>
/// boundary, false otherwise
/// \details Internally the function calls IsAlignedOn with a second
-/// parameter of GetAlignmentOf<T*>.
+/// parameter of GetAlignmentOf<T>.
template <class T>
inline bool IsAligned(const void *ptr)
{
- // Switch to T* due to https://github.com/weidai11/cryptopp/issues/992
- return IsAlignedOn(ptr, GetAlignmentOf<T*>());
+ return IsAlignedOn(ptr, GetAlignmentOf<T>());
}
#if (CRYPTOPP_LITTLE_ENDIAN)