summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-08-11 17:13:15 -0400
committerJeffrey Walton <noloader@gmail.com>2017-08-11 17:13:15 -0400
commit953252e44d25ce820c9d8b7aa708c0dfc1223e6e (patch)
treeb7116470776d45e831015e93d0691ec725709313 /config.h
parent173dd0b530620d1a31388eaf1ca07e922f371729 (diff)
downloadcryptopp-git-953252e44d25ce820c9d8b7aa708c0dfc1223e6e.tar.gz
Move from 'static' to 'enum' for class constants
Enums don't take up space in class objects. Its should result in smaller objects and faster code
Diffstat (limited to 'config.h')
-rw-r--r--config.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/config.h b/config.h
index ef1fed2b..0cb20bb5 100644
--- a/config.h
+++ b/config.h
@@ -490,7 +490,7 @@ NAMESPACE_END
// Microsoft plans to support ARM-64, but its not clear how to detect it.
// TODO: Add MSC_VER and ARM-64 platform define when available
#if !defined(CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE) && !defined(CRYPTOPP_DISABLE_ASM)
-# if defined(__ARM_FEATURE_CRYPTO)
+# if defined(__ARM_FEATURE_CRYPTO) || (CRYPTOPP_MSC_VERSION >= 1910)
# define CRYPTOPP_BOOL_ARM_CRYPTO_INTRINSICS_AVAILABLE 1
# endif
#endif
@@ -530,11 +530,12 @@ NAMESPACE_END
#endif
// How to declare class constants
-#if (_MSC_VER == 1300) || defined(__INTEL_COMPILER) || defined(__BORLANDC__)
-# define CRYPTOPP_CONSTANT(x) enum {x};
-#else
-# define CRYPTOPP_CONSTANT(x) static const int x;
-#endif
+//#if (_MSC_VER == 1300) || defined(__INTEL_COMPILER) || defined(__BORLANDC__)
+//# define CRYPTOPP_CONSTANT(x) enum {x};
+//#else
+//# define CRYPTOPP_CONSTANT(x) static const int x;
+//#endif
+#define CRYPTOPP_CONSTANT(x) enum {x};
// Linux provides X32, which is 32-bit integers, longs and pointers on x86_64 using the full x86_64 register set.
// Detect via __ILP32__ (http://wiki.debian.org/X32Port). However, __ILP32__ shows up in more places than