Add nextNodeBefore primitive.
[SXSI/XMLTree.git] / libcds / src / coders / huffman_codes.cpp
index a3ccf1a..d11458d 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include <huffman_codes.h>
+using std::max;
 
 huffman_codes::huffman_codes(uint * symb, uint n) {
   uint max_v = 0;
@@ -39,7 +40,7 @@ huffman_codes::huffman_codes(uchar * symb, uint n) {
   for(uint i=0;i<n;i++)
     max_v = max(max_v,symb[i]);
   uint * occ = new uint[max_v+1];
-  for(uint i=0;i<max_v+1;i++)
+  for(uint i=0;i<(uint)max_v+1;i++)
     occ[i] = 0;
   for(uint i=0;i<n;i++)
     occ[symb[i]]++;