From e200288d061338bfaf3df58da800dd5660ac2f46 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 24 May 2022 13:21:56 +0200 Subject: [PATCH] Build fix, runtime_crc32c() should be in namespace detail --- src/crc32.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/crc32.cpp b/src/crc32.cpp index 535f20a..f8962bb 100644 --- a/src/crc32.cpp +++ b/src/crc32.cpp @@ -76,17 +76,19 @@ namespace wren { #endif } //unnamed namespace - [[gnu::const]] - std::uint32_t runtime_crc32c (const char* data, std::size_t size, std::uint32_t crc) { + namespace detail { + [[gnu::const]] + std::uint32_t runtime_crc32c (const char* data, std::size_t size, std::uint32_t crc) { #if defined(WRENPP_WITH_SSE42) - //if (_may_i_use_cpu_feature(_FEATURE_SSE4_2)) { - if (__builtin_cpu_supports("sse4.2")) { - return crc32c_hw(data, size, crc); - } - else + //if (_may_i_use_cpu_feature(_FEATURE_SSE4_2)) { + if (__builtin_cpu_supports("sse4.2")) { + return crc32c_hw(data, size, crc); + } + else #endif - { - return detail::crc32(data, size, crc); + { + return detail::crc32(data, size, crc); + } } - } + } //namespace detail } //namespace wren