Remove LZX_ASSERT() (now almost unused)
authorEric Biggers <ebiggers3@gmail.com>
Sat, 19 Sep 2015 18:56:10 +0000 (13:56 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 27 Sep 2015 14:41:15 +0000 (09:41 -0500)
include/wimlib/lzx_common.h
src/lzx_compress.c

index ed9d0bb..4d75875 100644 (file)
 #include "wimlib/lzx_constants.h"
 #include "wimlib/types.h"
 
-//#define ENABLE_LZX_DEBUG
-#ifdef ENABLE_LZX_DEBUG
-#  include "wimlib/assert.h"
-#  define LZX_ASSERT wimlib_assert
-#else
-#  define LZX_ASSERT(...)
-#endif
-
 extern const u32 lzx_offset_slot_base[LZX_MAX_OFFSET_SLOTS + 1];
 
 extern const u8 lzx_extra_offset_bits[LZX_MAX_OFFSET_SLOTS];
index 863bb5e..de84301 100644 (file)
@@ -1019,9 +1019,6 @@ lzx_write_compressed_block(const u8 *block_begin,
                           const struct lzx_lens * prev_lens,
                           struct lzx_output_bitstream * os)
 {
-       LZX_ASSERT(block_type == LZX_BLOCKTYPE_ALIGNED ||
-                  block_type == LZX_BLOCKTYPE_VERBATIM);
-
        /* The first three bits indicate the type of block and are one of the
         * LZX_BLOCKTYPE_* constants.  */
        lzx_write_bits(os, block_type, 3);
@@ -1913,7 +1910,6 @@ lzx_find_longest_repeat_offset_match(const u8 * const in_next,
                                     unsigned *rep_max_idx_ret)
 {
        STATIC_ASSERT(LZX_NUM_RECENT_OFFSETS == 3);
-       LZX_ASSERT(bytes_remaining >= 2);
 
        const unsigned max_len = min(bytes_remaining, LZX_MAX_MATCH_LEN);
        const u16 next_2_bytes = load_u16_unaligned(in_next);