diff --git a/db/commitlog/commitlog.cc b/db/commitlog/commitlog.cc index 1ae98ff59f..8d2e5e554c 100644 --- a/db/commitlog/commitlog.cc +++ b/db/commitlog/commitlog.cc @@ -83,7 +83,7 @@ static logging::logger logger("commitlog"); using namespace std::chrono_literals; class crc32_nbo { - crc32 _c; + utils::crc32 _c; public: template void process(T t) { diff --git a/tests/crc_test.cc b/tests/crc_test.cc index 736704294e..d7c5e9f41e 100644 --- a/tests/crc_test.cc +++ b/tests/crc_test.cc @@ -32,14 +32,14 @@ thread_local disk_error_signal_type general_disk_error; inline uint32_t -do_compute_crc(crc32& c) { +do_compute_crc(utils::crc32& c) { return c.get(); } template inline uint32_t -do_compute_crc(crc32& c, const T& val, const Rest&... rest) { +do_compute_crc(utils::crc32& c, const T& val, const Rest&... rest) { c.process(val); return do_compute_crc(c, rest...); } @@ -48,7 +48,7 @@ template inline uint32_t compute_crc(const T&... vals) { - crc32 c; + utils::crc32 c; return do_compute_crc(c, vals...); } diff --git a/utils/crc.hh b/utils/crc.hh index 0a829058b8..98bb72181b 100644 --- a/utils/crc.hh +++ b/utils/crc.hh @@ -24,6 +24,8 @@ #include #include +namespace utils { + class crc32 { uint32_t _r = 0; public: @@ -95,3 +97,5 @@ public: return _r; } }; + +}