@@ -67,7 +67,7 @@ pub unsafe extern fn ctzll(mut x : usize) -> usize {
67
67
let mut count : u8 = 0u8 ;
68
68
while x & 0usize != 0 {
69
69
count = ( count as i32 + 1i32 ) as u8 ;
70
- x = x >> 1i32 ;
70
+ x = x >> 1 ;
71
71
}
72
72
count as usize
73
73
}
@@ -78,17 +78,17 @@ static kCutoffTransformsCount : u32 = 10u32;
78
78
79
79
static kCutoffTransforms
80
80
: usize
81
- = 0x71b520ausize << 32i32 | 0xda2d3200u32 as usize ;
81
+ = 0x71b520ausize << 32 | 0xda2d3200u32 as usize ;
82
82
83
83
static kHashMul32 : u32 = 0x1e35a7bdu32 ;
84
84
85
85
static kHashMul64
86
86
: usize
87
- = 0x1e35a7bdusize << 32i32 | 0x1e35a7bdusize ;
87
+ = 0x1e35a7bdusize << 32 | 0x1e35a7bdusize ;
88
88
89
89
static kHashMul64Long
90
90
: usize
91
- = 0x1fe35a7bu32 as usize << 32i32 | 0xd3579bd3u32 as usize ;
91
+ = 0x1fe35a7bu32 as usize << 32 | 0xd3579bd3u32 as usize ;
92
92
93
93
static kInfinity : f32 = 1.7e38f32 ;
94
94
@@ -219,7 +219,7 @@ unsafe extern fn ZopfliNodeCopyDistance(
219
219
unsafe extern fn ZopfliNodeLengthCode (
220
220
mut self : * const ZopfliNode
221
221
) -> u32 {
222
- let modifier : u32 = ( * self ) . length >> 25i32 ;
222
+ let modifier : u32 = ( * self ) . length >> 25 ;
223
223
ZopfliNodeCopyLength ( self ) . wrapping_add ( 9 ) . wrapping_sub (
224
224
modifier
225
225
)
@@ -234,7 +234,7 @@ unsafe extern fn brotli_min_size_t(
234
234
unsafe extern fn ZopfliNodeDistanceCode (
235
235
mut self : * const ZopfliNode
236
236
) -> u32 {
237
- let short_code : u32 = ( * self ) . dcode_insert_length >> 27i32 ;
237
+ let short_code : u32 = ( * self ) . dcode_insert_length >> 27 ;
238
238
if short_code == 0u32 {
239
239
ZopfliNodeCopyDistance ( self ) . wrapping_add (
240
240
16u32
@@ -249,7 +249,7 @@ unsafe extern fn ZopfliNodeDistanceCode(
249
249
unsafe extern fn Log2FloorNonZero ( mut n : usize ) -> u32 {
250
250
let mut result : u32 = 0u32 ;
251
251
while {
252
- n = n >> 1i32 ;
252
+ n = n >> 1 ;
253
253
n
254
254
} != 0 {
255
255
result = result. wrapping_add ( 1 ) ;
@@ -290,7 +290,7 @@ unsafe extern fn PrefixEncodeCopyDistance(
290
290
: usize
291
291
= ( 2usize ) . wrapping_add ( prefix) << bucket;
292
292
let mut nbits : usize = bucket. wrapping_sub ( postfix_bits) ;
293
- * code = ( nbits << 10i32 | ( 16usize ) . wrapping_add (
293
+ * code = ( nbits << 10 | ( 16usize ) . wrapping_add (
294
294
num_direct_codes
295
295
) . wrapping_add (
296
296
( 2usize ) . wrapping_mul (
@@ -318,7 +318,7 @@ unsafe extern fn GetInsertLengthCode(
318
318
) . wrapping_sub (
319
319
1u32
320
320
) ;
321
- ( ( nbits << 1i32 ) as usize ) . wrapping_add (
321
+ ( ( nbits << 1 ) as usize ) . wrapping_add (
322
322
insertlen. wrapping_sub ( 2 ) >> nbits
323
323
) . wrapping_add (
324
324
2usize
@@ -349,7 +349,7 @@ unsafe extern fn GetCopyLengthCode(mut copylen : usize) -> u16 {
349
349
) . wrapping_sub (
350
350
1u32
351
351
) ;
352
- ( ( nbits << 1i32 ) as usize ) . wrapping_add (
352
+ ( ( nbits << 1 ) as usize ) . wrapping_add (
353
353
copylen. wrapping_sub ( 6 ) >> nbits
354
354
) . wrapping_add (
355
355
4usize
@@ -370,7 +370,7 @@ unsafe extern fn CombineLengthCodes(
370
370
) -> u16 {
371
371
let mut bits64
372
372
: u16
373
- = ( copycode as u32 & 0x7u32 | ( inscode as u32 & 0x7u32 ) << 3i32 ) as u16 ;
373
+ = ( copycode as u32 & 0x7u32 | ( inscode as u32 & 0x7u32 ) << 3 ) as u16 ;
374
374
if use_last_distance != 0 && ( inscode as i32 < 8i32 ) && ( copycode as i32 < 16i32 ) {
375
375
if copycode as i32 < 8i32 {
376
376
bits64 as i32
@@ -380,8 +380,8 @@ unsafe extern fn CombineLengthCodes(
380
380
} else {
381
381
let mut offset
382
382
: i32
383
- = 2i32 * ( ( copycode as i32 >> 3i32 ) + 3i32 * ( inscode as i32 >> 3i32 ) ) ;
384
- offset = ( offset << 5i32 ) + 0x40i32 + ( 0x520d40i32 >> offset & 0xc0i32 ) ;
383
+ = 2i32 * ( ( copycode as i32 >> 3 ) + 3i32 * ( inscode as i32 >> 3 ) ) ;
384
+ offset = ( offset << 5 ) + 0x40i32 + ( 0x520d40i32 >> offset & 0xc0i32 ) ;
385
385
( offset as u16 as i32 | bits64 as i32 ) as u16
386
386
}
387
387
}
@@ -407,7 +407,7 @@ unsafe extern fn InitCommand(
407
407
) {
408
408
let mut delta : u32 = copylen_code_delta as i8 as u8 as u32 ;
409
409
( * self ) . insert_len_ = insertlen as u32 ;
410
- ( * self ) . copy_len_ = ( copylen | ( delta << 25i32 ) as usize ) as u32 ;
410
+ ( * self ) . copy_len_ = ( copylen | ( delta << 25 ) as usize ) as u32 ;
411
411
PrefixEncodeCopyDistance (
412
412
distance_code,
413
413
( * dist) . num_direct_distance_codes as usize ,
@@ -689,7 +689,7 @@ unsafe extern fn FindMatchLengthWithLimit(
689
689
let mut matched : usize = 0usize ;
690
690
let mut limit2
691
691
: usize
692
- = ( limit >> 3i32 ) . wrapping_add ( 1 ) ;
692
+ = ( limit >> 3 ) . wrapping_add ( 1 ) ;
693
693
while {
694
694
limit2 = limit2. wrapping_sub ( 1 ) ;
695
695
limit2
@@ -710,7 +710,7 @@ unsafe extern fn FindMatchLengthWithLimit(
710
710
s1. offset ( matched as isize ) as ( * const std:: os:: raw:: c_void )
711
711
) ;
712
712
let mut matching_bits : usize = ctzll ( x) as usize ;
713
- matched = matched. wrapping_add ( matching_bits >> 3i32 ) ;
713
+ matched = matched. wrapping_add ( matching_bits >> 3 ) ;
714
714
return matched;
715
715
}
716
716
}
@@ -733,7 +733,7 @@ unsafe extern fn InitBackwardMatch(
733
733
mut self : * mut BackwardMatch , mut dist : usize , mut len : usize
734
734
) {
735
735
( * self ) . distance = dist as u32 ;
736
- ( * self ) . length_and_code = ( len << 5i32 ) as u32 ;
736
+ ( * self ) . length_and_code = ( len << 5 ) as u32 ;
737
737
}
738
738
739
739
#[ derive( Clone , Copy ) ]
@@ -758,7 +758,7 @@ unsafe extern fn HashBytesH10(mut data : *const u8) -> u32 {
758
758
) . wrapping_mul (
759
759
kHashMul32
760
760
) ;
761
- h >> 32i32 - 17i32
761
+ h >> 32 - 17i32
762
762
}
763
763
764
764
unsafe extern fn ForestH10 ( mut self : * mut H10 ) -> * mut u32 {
@@ -932,7 +932,7 @@ unsafe extern fn InitDictionaryBackwardMatch(
932
932
mut len_code : usize
933
933
) {
934
934
( * self ) . distance = dist as u32 ;
935
- ( * self ) . length_and_code = ( len << 5i32 | if len == len_code {
935
+ ( * self ) . length_and_code = ( len << 5 | if len == len_code {
936
936
0usize
937
937
} else {
938
938
len_code
@@ -1063,7 +1063,7 @@ unsafe extern fn FindAllMatchesH10(
1063
1063
let mut distance
1064
1064
: usize
1065
1065
= max_backward. wrapping_add ( gap) . wrapping_add (
1066
- ( dict_id >> 5i32 ) as usize
1066
+ ( dict_id >> 5 ) as usize
1067
1067
) . wrapping_add (
1068
1068
1usize
1069
1069
) ;
@@ -1094,7 +1094,7 @@ unsafe extern fn FindAllMatchesH10(
1094
1094
unsafe extern fn BackwardMatchLength (
1095
1095
mut self : * const BackwardMatch
1096
1096
) -> usize {
1097
- ( ( * self ) . length_and_code >> 5i32 ) as usize
1097
+ ( ( * self ) . length_and_code >> 5 ) as usize
1098
1098
}
1099
1099
1100
1100
unsafe extern fn MaxZopfliCandidates (
@@ -1377,9 +1377,9 @@ unsafe extern fn UpdateZopfliNode(
1377
1377
9u32 as usize
1378
1378
) . wrapping_sub (
1379
1379
len_code
1380
- ) << 25i32 ) as u32 ;
1380
+ ) << 25 ) as u32 ;
1381
1381
( * next) . distance = dist as u32 ;
1382
- ( * next) . dcode_insert_length = ( short_code << 27i32 | pos. wrapping_sub (
1382
+ ( * next) . dcode_insert_length = ( short_code << 27 | pos. wrapping_sub (
1383
1383
start_pos
1384
1384
) ) as u32 ;
1385
1385
( * next) . u . cost = cost;
@@ -1605,7 +1605,7 @@ unsafe extern fn UpdateNodes(
1605
1605
& mut dist_symbol as ( * mut u16 ) ,
1606
1606
& mut distextra as ( * mut u32 )
1607
1607
) ;
1608
- distnumextra = ( dist_symbol as i32 >> 10i32 ) as u32 ;
1608
+ distnumextra = ( dist_symbol as i32 >> 10 ) as u32 ;
1609
1609
dist_cost = base_cost + distnumextra as ( f32 ) + ZopfliCostModelGetDistanceCost (
1610
1610
model,
1611
1611
( dist_symbol as i32 & 0x3ffi32 ) as usize
0 commit comments