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
diff options
context:
space:
mode:
Diffstat (limited to 'coding/huffman.cpp')
-rw-r--r--coding/huffman.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/coding/huffman.cpp b/coding/huffman.cpp
index acdd945303..a8d8a1275a 100644
--- a/coding/huffman.cpp
+++ b/coding/huffman.cpp
@@ -6,22 +6,14 @@ namespace coding
{
HuffmanCoder::~HuffmanCoder()
{
- try
- {
- DeleteHuffmanTree(m_root);
- }
- catch (...)
- {
- LOG(LWARNING, ("Caught an exception when deleting a Huffman tree."));
- }
+ DeleteHuffmanTree(m_root);
}
void HuffmanCoder::Init(vector<strings::UniString> const & data)
{
+ DeleteHuffmanTree(m_root);
BuildHuffmanTree(data.begin(), data.end());
BuildTables(m_root, 0);
- DeleteHuffmanTree(m_root);
- m_root = nullptr;
}
bool HuffmanCoder::Encode(uint32_t symbol, Code & code) const