Skip to content

Commit

Permalink
GetEncofing_metaでのif文の判定回数を減らす
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohki Akikaze committed Oct 3, 2020
1 parent 25e52b1 commit 0cf9e2e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sakura_core/charset/CESI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,12 @@ void CESI::GetEncodingInfo_meta( const char* pS, const int nLen )
if( nret != CODE_NONE ){
// 判定に成功した場合はencodingを更新する
encoding = nret;
}
}
if( encoding == CODE_NONE || encoding == CODE_AUTODETECT ){
nret = AutoDetectByHTML( pS, nLen );
if( nret != CODE_NONE ){
// 判定に成功した場合はencodingを更新する
encoding = nret;
} else {
nret = AutoDetectByHTML( pS, nLen );
if( nret != CODE_NONE ){
// 判定に成功した場合はencodingを更新する
encoding = nret;
}
}
}
m_eMetaName = encoding;
Expand Down

0 comments on commit 0cf9e2e

Please sign in to comment.