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:
authorMaxim Pimenov <m@maps.me>2015-07-21 13:23:57 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:56:58 +0300
commit64067f1917d5b3b69d8909e06ac481398650c686 (patch)
treed1c4af49924a03924fcd4f5ad94364b854b12ab5 /coding/huffman.cpp
parent097618caddc3734e141ef18275f2ab3672f1f8f4 (diff)
Review fixes.
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