diff --git a/coding/simple_dense_coding.cpp b/coding/simple_dense_coding.cpp index efb712c2da2..3dd1ec5aed5 100644 --- a/coding/simple_dense_coding.cpp +++ b/coding/simple_dense_coding.cpp @@ -2,8 +2,8 @@ #include "base/assert.hpp" -#include "std/algorithm.hpp" -#include "std/limits.hpp" +#include +#include #if defined(__clang__) #pragma clang diagnostic push @@ -20,10 +20,10 @@ namespace coding { namespace { -size_t const kAlphabetSize = static_cast(numeric_limits::max()) + 1; +size_t const kAlphabetSize = static_cast(std::numeric_limits::max()) + 1; // Calculates frequences for data symbols. -void CalcFrequences(vector const & data, uint64_t frequency[]) +void CalcFrequences(std::vector const & data, uint64_t frequency[]) { memset(frequency, 0, sizeof(*frequency) * kAlphabetSize); for (uint8_t symbol : data) @@ -31,7 +31,7 @@ void CalcFrequences(vector const & data, uint64_t frequency[]) } } // namespace -SimpleDenseCoding::SimpleDenseCoding(vector const & data) +SimpleDenseCoding::SimpleDenseCoding(std::vector const & data) { // This static initialization isn't thread safe prior to C++11. uint64_t frequency[kAlphabetSize]; // Maps symbols to frequences. @@ -47,7 +47,7 @@ SimpleDenseCoding::SimpleDenseCoding(vector const & data) { return frequency[lsym] > frequency[rsym]; }; - sort(symbols, symbols + kAlphabetSize, frequencyCmp); + std::sort(symbols, symbols + kAlphabetSize, frequencyCmp); for (size_t r = 0; r < kAlphabetSize; ++r) rank[symbols[r]] = r; diff --git a/coding/simple_dense_coding.hpp b/coding/simple_dense_coding.hpp index dee95e6804d..e23e633a8d2 100644 --- a/coding/simple_dense_coding.hpp +++ b/coding/simple_dense_coding.hpp @@ -1,8 +1,19 @@ #pragma once -#include "std/vector.hpp" +#include +#include +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-private-field" +#endif + #include "3party/succinct/elias_fano_compressed_list.hpp" + +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + namespace coding { @@ -32,7 +43,7 @@ class SimpleDenseCoding public: SimpleDenseCoding() = default; - SimpleDenseCoding(vector const & data); + SimpleDenseCoding(std::vector const & data); SimpleDenseCoding(SimpleDenseCoding && rhs); diff --git a/indexer/succinct_trie_reader.hpp b/indexer/succinct_trie_reader.hpp index eef4d457f16..da8a7160103 100644 --- a/indexer/succinct_trie_reader.hpp +++ b/indexer/succinct_trie_reader.hpp @@ -14,7 +14,17 @@ #include #include +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wunused-private-field" +#endif + #include "3party/succinct/rs_bit_vector.hpp" + +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + namespace trie {