Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/coding
diff options
context:
space:
mode:
authorygorshenin <mipt.vi002@gmail.com>2016-12-20 15:10:34 +0300
committerGitHub <noreply@github.com>2016-12-20 15:10:34 +0300
commit3b38d0df3b53f870af4235fe566487e5449fcae9 (patch)
tree4ee451899d457a5c2097f31b96c97e5164e48585 /coding
parent770336e8aefb3b3f1269bdd7a5ba20e97cd09a72 (diff)
parent07cf333622995e81f4dffc7a8efef999c1395936 (diff)
Merge pull request #5063 from syershov/fix-warnings
Fix warnings
Diffstat (limited to 'coding')
-rw-r--r--coding/huffman.hpp8
-rw-r--r--coding/zlib.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/coding/huffman.hpp b/coding/huffman.hpp
index dfe2882614..a59b24a195 100644
--- a/coding/huffman.hpp
+++ b/coding/huffman.hpp
@@ -21,10 +21,10 @@ public:
struct Code
{
uint32_t bits;
- uint32_t len;
+ size_t len;
Code() : bits(0), len(0) {}
- Code(uint32_t bits, uint32_t len) : bits(bits), len(len) {}
+ Code(uint32_t bits, size_t len) : bits(bits), len(len) {}
bool operator<(const Code & o) const
{
@@ -134,7 +134,7 @@ private:
Node *l, *r;
uint32_t symbol;
uint32_t freq;
- uint32_t depth;
+ size_t depth;
bool isLeaf;
Node(uint32_t symbol, uint32_t freq, bool isLeaf)
@@ -156,7 +156,7 @@ private:
// No need to clump the interface: keep private the methods
// that encode one symbol only.
template <typename TWriter>
- uint32_t EncodeAndWrite(BitWriter<TWriter> & bitWriter, uint32_t symbol) const
+ size_t EncodeAndWrite(BitWriter<TWriter> & bitWriter, uint32_t symbol) const
{
Code code;
CHECK(Encode(symbol, code), ());
diff --git a/coding/zlib.cpp b/coding/zlib.cpp
index e1646d2f91..f54cc574b4 100644
--- a/coding/zlib.cpp
+++ b/coding/zlib.cpp
@@ -25,7 +25,7 @@ ZLib::Processor::Processor(void const * data, size_t size) noexcept : m_init(fal
// zconf.h. So, for portability, const_cast<...> is used here, but
// in any case, zlib does not modify |data|.
m_stream.next_in = static_cast<unsigned char *>(const_cast<void *>(data));
- m_stream.avail_in = size;
+ m_stream.avail_in = static_cast<unsigned int>(size);
m_stream.next_out = m_buffer;
m_stream.avail_out = kBufferSize;