diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-04-30 17:53:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 17:53:58 -0400 |
commit | a379c5644a39e4816667aa0967c9ebda4fcd0144 (patch) | |
tree | 6ffc8ba784717b31d143ed12d3e7cb26caa02c51 /blake2.cpp | |
parent | b9fe3a3415e751897fe148dae50dcad92e02e993 (diff) | |
download | cryptopp-git-a379c5644a39e4816667aa0967c9ebda4fcd0144.tar.gz |
Clear alignment warnings on ARM 32-bit platforms (#828)
Diffstat (limited to 'blake2.cpp')
-rw-r--r-- | blake2.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -43,16 +43,17 @@ # undef CRYPTOPP_ALTIVEC_AVAILABLE
#endif
+// Can't use GetAlignmentOf<word64>() because of C++11 and constexpr
+// Can use 'const unsigned int' because of MSVC
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64)
-const unsigned int ALIGN_SPEC32=16;
-const unsigned int ALIGN_SPEC64=16;
+# define ALIGN_SPEC32 16
+# define ALIGN_SPEC64 16
#elif (CRYPTOPP_CXX11_ALIGNOF)
-const unsigned int ALIGN_SPEC32=alignof(CryptoPP::word32);
-const unsigned int ALIGN_SPEC64=alignof(CryptoPP::word64);
+# define ALIGN_SPEC32 alignof(CryptoPP::word32)
+# define ALIGN_SPEC64 alignof(CryptoPP::word64)
#else
-// Can't use GetAlignmentOf<word64>() because of C++11 constexpr
-const unsigned int ALIGN_SPEC32=4;
-const unsigned int ALIGN_SPEC64=8;
+# define ALIGN_SPEC32 4
+# define ALIGN_SPEC64 8
#endif
NAMESPACE_BEGIN(CryptoPP)
|