File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ td::Result<td::BufferSlice> boc_compress_improved_structure_lz4(const std::vecto
283283 continue ;
284284
285285 int delta = rank[boc_graph[node][j]] - i - 2 ; // Always >= 0 because of above check
286- size_t required_bits = 1 + (31 ^ __builtin_clz (node_count - i - 3 ));
286+ size_t required_bits = 1 + (31 ^ td::count_leading_zeroes32 (node_count - i - 3 ));
287287
288288 if (required_bits < 8 - (result.size () + 1 ) % 8 + 1 ) {
289289 append_uint (result, delta, required_bits);
@@ -494,7 +494,7 @@ td::Result<std::vector<td::Ref<vm::Cell>>> boc_decompress_improved_structure_lz4
494494 for (int j = 0 ; j < cell_refs_cnt[i]; ++j) {
495495 if (!boc_graph[i][j]) {
496496 size_t pref_size = (orig_size - bit_reader.size ());
497- size_t required_bits = 1 + (31 ^ __builtin_clz (node_count - i - 3 ));
497+ size_t required_bits = 1 + (31 ^ td::count_leading_zeroes32 (node_count - i - 3 ));
498498
499499 if (required_bits < 8 - (pref_size + 1 ) % 8 + 1 ) {
500500 TRY_RESULT_ASSIGN (boc_graph[i][j], read_uint (bit_reader, required_bits));
You can’t perform that action at this time.
0 commit comments