diff --git a/.bettercodehub.yml b/.bettercodehub.yml deleted file mode 100644 index efdb1b4..0000000 --- a/.bettercodehub.yml +++ /dev/null @@ -1,6 +0,0 @@ -component_depth: 2 -languages: - - cpp -exclude: - - .*\.h - - .*\.c diff --git a/README.md b/README.md index 2b2db47..814d3b0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/80cf9a0514554f368effaf78d8e4ae15)](https://www.codacy.com/app/Phundrak/lzw-assignment?utm_source=github.com&utm_medium=referral&utm_content=Phundrak/lzw-assignment&utm_campaign=Badge_Grade) [![CodeFactor](https://www.codefactor.io/repository/github/phundrak/lzw-assignment/badge)](https://www.codefactor.io/repository/github/phundrak/lzw-assignment) [![Spacemacs Badge](https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg)](http://spacemacs.org) -[![BCH compliance](https://bettercodehub.com/edge/badge/Phundrak/lzw-assignment?branch=master)](https://bettercodehub.com/) # LZW Compressing tool diff --git a/src/bitpack.cc b/src/bitpack.cc index a8e05e1..e8934f6 100644 --- a/src/bitpack.cc +++ b/src/bitpack.cc @@ -97,8 +97,8 @@ vuchar pack_16(const vuint16::const_iterator t_input_begin, vuchar pack(const vuint16 t_input) { vuchar ret{}; constexpr int max_value = ipow(2, 8); - for(auto it = t_input.begin(); it != t_input.end(); ++it) { - if(*it >= max_value) { + for (auto it = t_input.begin(); it != t_input.end(); ++it) { + if (*it >= max_value) { const auto next_vec = pack_n(static_cast(it), t_input.end(), 9); ret.insert(ret.end(), next_vec.begin(), next_vec.end()); diff --git a/src/bitpack.hh b/src/bitpack.hh index 671ddfc..f47bf7d 100644 --- a/src/bitpack.hh +++ b/src/bitpack.hh @@ -10,12 +10,13 @@ #include /// \brief Packs std::uint16_t of n bits into unsigned char -std::vector pack_n(const std::vector::const_iterator, - const std::vector::const_iterator, - int); +std::vector +pack_n(const std::vector::const_iterator, + const std::vector::const_iterator, int); /// \brief Specialization of \ref pack_n for 16bits -std::vector pack_16(const std::vector::const_iterator, - const std::vector::const_iterator); +std::vector +pack_16(const std::vector::const_iterator, + const std::vector::const_iterator); #endif /* LZW_SRC_BITPACK_H_ */