Skip to content

Commit

Permalink
Fix thinko
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter committed Aug 30, 2024
1 parent e162d0d commit 50a5599
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stl/inc/__msvc_string_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,13 +715,13 @@ constexpr size_t _Traits_find_first_of(_In_reads_(_Hay_size) const _Traits_ptr_t
if (!_STD _Is_constant_evaluated()) {
using _Elem = typename _Traits::char_type;

bool _Use_bitmap = true;

#if _USE_STD_VECTOR_ALGORITHMS
const bool _Try_vectorize = _Hay_size - _Start_at > _Threshold_find_first_of;

// Additional condition for when the vectorization outperforms the table lookup
const bool _Use_bitmap = !_Try_vectorize || (sizeof(_Elem) > 1 && sizeof(_Elem) * _Needle_size > 16);
#else
const bool _Use_bitmap = true;
_Use_bitmap = !_Try_vectorize || (sizeof(_Elem) > 1 && sizeof(_Elem) * _Needle_size > 16);
#endif // _USE_STD_VECTOR_ALGORITHMS

if (_Use_bitmap) {
Expand Down

0 comments on commit 50a5599

Please sign in to comment.