summaryrefslogtreecommitdiffstats
path: root/encoder_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'encoder_base.h')
-rw-r--r--encoder_base.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/encoder_base.h b/encoder_base.h
index f47ec48..49ed200 100644
--- a/encoder_base.h
+++ b/encoder_base.h
@@ -1,5 +1,5 @@
/* Clzip - LZMA lossless data compressor
- Copyright (C) 2010-2022 Antonio Diaz Diaz.
+ Copyright (C) 2010-2023 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ static inline int price1( const Bit_model probability )
{ return get_price( bit_model_total - probability ); }
static inline int price_bit( const Bit_model bm, const bool bit )
- { return ( bit ? price1( bm ) : price0( bm ) ); }
+ { return bit ? price1( bm ) : price0( bm ); }
static inline int price_symbol3( const Bit_model bm[], int symbol )
@@ -263,7 +263,6 @@ static inline void Re_shift_low( struct Range_encoder * const renc )
static inline void Re_reset( struct Range_encoder * const renc,
const unsigned dictionary_size )
{
- int i;
renc->low = 0;
renc->partial_member_pos = 0;
renc->pos = 0;
@@ -271,8 +270,7 @@ static inline void Re_reset( struct Range_encoder * const renc,
renc->ff_count = 0;
renc->cache = 0;
Lh_set_dictionary_size( renc->header, dictionary_size );
- for( i = 0; i < Lh_size; ++i )
- Re_put_byte( renc, renc->header[i] );
+ int i; for( i = 0; i < Lh_size; ++i ) Re_put_byte( renc, renc->header[i] );
}
static inline bool Re_init( struct Range_encoder * const renc,