summaryrefslogtreecommitdiff
path: root/blake2.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-04-30 17:53:58 -0400
committerGitHub <noreply@github.com>2019-04-30 17:53:58 -0400
commita379c5644a39e4816667aa0967c9ebda4fcd0144 (patch)
tree6ffc8ba784717b31d143ed12d3e7cb26caa02c51 /blake2.cpp
parentb9fe3a3415e751897fe148dae50dcad92e02e993 (diff)
downloadcryptopp-git-a379c5644a39e4816667aa0967c9ebda4fcd0144.tar.gz
Clear alignment warnings on ARM 32-bit platforms (#828)
Diffstat (limited to 'blake2.cpp')
-rw-r--r--blake2.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/blake2.cpp b/blake2.cpp
index 622603c3..4623d23b 100644
--- a/blake2.cpp
+++ b/blake2.cpp
@@ -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)