Skip to content

Commit 8acb0a7

Browse files
committed
Apply _countof()
1 parent 0c8c77c commit 8acb0a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sakura_core/extmodule/CBregexp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ wchar_t* CBregexp::MakePatternAlternate( const wchar_t* const szSearch, const wc
294294
std::wstring::size_type modifiedSearchSize = 0;
295295
for( const wchar_t* p = szSearch; *p; ++p ) {
296296
if( *p == L'.') {
297-
modifiedSearchSize += (sizeof szDotAlternative) / (sizeof szDotAlternative[0]) - 1;
297+
modifiedSearchSize += _countof(szDotAlternative) - 1;
298298
} else if( *p == L'$' ) {
299-
modifiedSearchSize += (sizeof szDollarAlternative) / (sizeof szDollarAlternative[0]) - 1;
299+
modifiedSearchSize += _countof(szDollarAlternative) - 1;
300300
} else {
301301
modifiedSearchSize += 1;
302302
}

0 commit comments

Comments
 (0)