From: Adam C. Emerson Date: Sat, 23 Dec 2017 03:05:32 +0000 (-0500) Subject: compressor: Use unqualified encode/decode X-Git-Tag: v13.0.2~540^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62c97dea24ee83bf88a078712de34165a81dc828;p=ceph.git compressor: Use unqualified encode/decode This is a portion of the namespace project. Signed-off-by: Adam C. Emerson --- diff --git a/src/compressor/lz4/LZ4Compressor.h b/src/compressor/lz4/LZ4Compressor.h index 3ab96e233320..a990808b96a4 100644 --- a/src/compressor/lz4/LZ4Compressor.h +++ b/src/compressor/lz4/LZ4Compressor.h @@ -40,7 +40,7 @@ class LZ4Compressor : public Compressor { unsigned num = src.get_num_buffers(); uint32_t origin_len; int compressed_len; - ::encode((uint32_t)num, dst); + encode((uint32_t)num, dst); while (left) { origin_len = p.get_ptr_and_advance(left, &data); compressed_len = LZ4_compress_fast_continue( @@ -50,8 +50,8 @@ class LZ4Compressor : public Compressor { return -1; pos += compressed_len; left -= origin_len; - ::encode(origin_len, dst); - ::encode((uint32_t)compressed_len, dst); + encode(origin_len, dst); + encode((uint32_t)compressed_len, dst); } assert(p.end()); @@ -69,12 +69,12 @@ class LZ4Compressor : public Compressor { bufferlist &dst) override { uint32_t count; std::vector > compressed_pairs; - ::decode(count, p); + decode(count, p); compressed_pairs.resize(count); uint32_t total_origin = 0; for (unsigned i = 0; i < count; ++i) { - ::decode(compressed_pairs[i].first, p); - ::decode(compressed_pairs[i].second, p); + decode(compressed_pairs[i].first, p); + decode(compressed_pairs[i].second, p); total_origin += compressed_pairs[i].first; } compressed_len -= (sizeof(uint32_t) + sizeof(uint32_t) * count * 2); diff --git a/src/compressor/zstd/ZstdCompressor.h b/src/compressor/zstd/ZstdCompressor.h index 4df4193edc49..82bb2f9d52f9 100644 --- a/src/compressor/zstd/ZstdCompressor.h +++ b/src/compressor/zstd/ZstdCompressor.h @@ -58,7 +58,7 @@ class ZstdCompressor : public Compressor { ZSTD_freeCStream(s); // prefix with decompressed length - ::encode((uint32_t)src.length(), dst); + encode((uint32_t)src.length(), dst); dst.append(outptr, 0, outbuf.pos); return 0; } @@ -76,7 +76,7 @@ class ZstdCompressor : public Compressor { } compressed_len -= 4; uint32_t dst_len; - ::decode(dst_len, p); + decode(dst_len, p); bufferptr dstptr(dst_len); ZSTD_outBuffer_s outbuf;