fix:clang-tidy warning

This commit is contained in:
xiaoyifang 2023-04-22 14:25:44 +08:00 committed by YiFang Xiao
parent b68a70caa6
commit 130044b092
2 changed files with 4 additions and 4 deletions

View file

@ -114,7 +114,7 @@ gd::wstring Iconv::toWstring( char const * fromEncoding, void const * fromData,
/// behaviour in that regard. /// behaviour in that regard.
if ( !dataSize ) if ( !dataSize )
return gd::wstring(); return {};
Iconv ic( Utf8, fromEncoding ); Iconv ic( Utf8, fromEncoding );
@ -129,7 +129,7 @@ std::string Iconv::toUtf8( char const * fromEncoding, void const * fromData,
// Similar to toWstring // Similar to toWstring
if ( !dataSize ) if ( !dataSize )
return std::string(); return {};
Iconv ic( Utf8, fromEncoding ); Iconv ic( Utf8, fromEncoding );

View file

@ -235,7 +235,7 @@ bool IndexedZip::indexFile( BtreeIndexing::IndexedWords &zipFileNames, quint32 *
wstring decoded = Iconv::toWstring( "CP866", entry.fileName.constData(), wstring decoded = Iconv::toWstring( "CP866", entry.fileName.constData(),
entry.fileName.size() ); entry.fileName.size() );
if( nameInSystemLocale.compare( decoded ) != 0 ) if( nameInSystemLocale != decoded )
{ {
zipFileNames.addSingleWord( decoded, zipFileNames.addSingleWord( decoded,
entry.localHeaderOffset ); entry.localHeaderOffset );
@ -258,7 +258,7 @@ bool IndexedZip::indexFile( BtreeIndexing::IndexedWords &zipFileNames, quint32 *
wstring decoded = Iconv::toWstring( "CP1251", entry.fileName.constData(), wstring decoded = Iconv::toWstring( "CP1251", entry.fileName.constData(),
entry.fileName.size() ); entry.fileName.size() );
if( nameInSystemLocale.compare( decoded ) != 0 ) if( nameInSystemLocale != decoded )
{ {
zipFileNames.addSingleWord( decoded, zipFileNames.addSingleWord( decoded,
entry.localHeaderOffset ); entry.localHeaderOffset );