Skip to content

Commit e7c1b0e

Browse files
committed
remove useless cast
1 parent d8dcdbb commit e7c1b0e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

extras/rapidfuzz_amalgamated.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
22
// SPDX-License-Identifier: MIT
33
// RapidFuzz v1.0.2
4-
// Generated: 2023-12-25 16:08:55.279788
4+
// Generated: 2023-12-25 16:10:46.428949
55
// ----------------------------------------------------------
66
// This file is an amalgamation of multiple different files.
77
// You probably shouldn't edit it directly.
@@ -7384,8 +7384,7 @@ auto levenshtein_hyrroe2003_block(const BlockPatternMatchVector& PM, const Range
73847384
vecs[last_block].VN = 0;
73857385

73867386
size_t chars_in_block = (last_block + 1 == words) ? ((s1.size() - 1) % word_size + 1) : 64;
7387-
scores[last_block] = scores[last_block - 1] + chars_in_block - static_cast<size_t>(HP_carry) +
7388-
static_cast<size_t>(HN_carry);
7387+
scores[last_block] = scores[last_block - 1] + chars_in_block - HP_carry + HN_carry;
73897388
// todo probably wrong types
73907389
scores[last_block] = static_cast<size_t>(static_cast<ptrdiff_t>(scores[last_block]) +
73917390
advance_block(last_block));

rapidfuzz/distance/Levenshtein_impl.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,7 @@ auto levenshtein_hyrroe2003_block(const BlockPatternMatchVector& PM, const Range
732732
vecs[last_block].VN = 0;
733733

734734
size_t chars_in_block = (last_block + 1 == words) ? ((s1.size() - 1) % word_size + 1) : 64;
735-
scores[last_block] = scores[last_block - 1] + chars_in_block - static_cast<size_t>(HP_carry) +
736-
static_cast<size_t>(HN_carry);
735+
scores[last_block] = scores[last_block - 1] + chars_in_block - HP_carry + HN_carry;
737736
// todo probably wrong types
738737
scores[last_block] =
739738
static_cast<size_t>(static_cast<ptrdiff_t>(scores[last_block]) + advance_block(last_block));

0 commit comments

Comments
 (0)