aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-02-04 22:47:49 +0800
committerfanquake <fanquake@gmail.com>2022-02-04 22:47:49 +0800
commit8fcb19fb47ae4629f40cd7ef04b5993855ddb462 (patch)
tree86271af98a03e019ea8bea0eb9e263c20fec78e0 /src
parentb6487dc4ef47ec9ea894eceac25f37d0b806f8aa (diff)
downloadbitcoin-8fcb19fb47ae4629f40cd7ef04b5993855ddb462.tar.xz
Squashed 'src/minisketch/' changes from 89629eb2c7..7eeb778fef
7eeb778fef Merge sipa/minisketch#58: Move `#ifdef HAVE_CLMUL` guard outside of the EnableClmul definition 4d9db2b897 Move `#ifdef HAVE_CLMUL` guard outside of the EnableClmul definition git-subtree-dir: src/minisketch git-subtree-split: 7eeb778fef45e21abca01ede85cf0a82e8a510df
Diffstat (limited to 'src')
-rw-r--r--src/minisketch.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/minisketch.cpp b/src/minisketch.cpp
index e9a322f139..d003fdf755 100644
--- a/src/minisketch.cpp
+++ b/src/minisketch.cpp
@@ -63,9 +63,9 @@ enum class FieldImpl {
#endif
};
+#ifdef HAVE_CLMUL
static inline bool EnableClmul()
{
-#ifdef HAVE_CLMUL
#ifdef _MSC_VER
int regs[4];
__cpuid(regs, 1);
@@ -74,10 +74,8 @@ static inline bool EnableClmul()
uint32_t eax, ebx, ecx, edx;
return (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & 0x2));
#endif
-#else
- return false;
-#endif
}
+#endif
Sketch* Construct(int bits, int impl)
{