mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
fix:clang-tidy warning
This commit is contained in:
parent
b68a70caa6
commit
130044b092
|
@ -114,7 +114,7 @@ gd::wstring Iconv::toWstring( char const * fromEncoding, void const * fromData,
|
|||
/// behaviour in that regard.
|
||||
|
||||
if ( !dataSize )
|
||||
return gd::wstring();
|
||||
return {};
|
||||
|
||||
Iconv ic( Utf8, fromEncoding );
|
||||
|
||||
|
@ -129,7 +129,7 @@ std::string Iconv::toUtf8( char const * fromEncoding, void const * fromData,
|
|||
// Similar to toWstring
|
||||
|
||||
if ( !dataSize )
|
||||
return std::string();
|
||||
return {};
|
||||
|
||||
Iconv ic( Utf8, fromEncoding );
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ bool IndexedZip::indexFile( BtreeIndexing::IndexedWords &zipFileNames, quint32 *
|
|||
wstring decoded = Iconv::toWstring( "CP866", entry.fileName.constData(),
|
||||
entry.fileName.size() );
|
||||
|
||||
if( nameInSystemLocale.compare( decoded ) != 0 )
|
||||
if( nameInSystemLocale != decoded )
|
||||
{
|
||||
zipFileNames.addSingleWord( decoded,
|
||||
entry.localHeaderOffset );
|
||||
|
@ -258,7 +258,7 @@ bool IndexedZip::indexFile( BtreeIndexing::IndexedWords &zipFileNames, quint32 *
|
|||
wstring decoded = Iconv::toWstring( "CP1251", entry.fileName.constData(),
|
||||
entry.fileName.size() );
|
||||
|
||||
if( nameInSystemLocale.compare( decoded ) != 0 )
|
||||
if( nameInSystemLocale != decoded )
|
||||
{
|
||||
zipFileNames.addSingleWord( decoded,
|
||||
entry.localHeaderOffset );
|
||||
|
|
Loading…
Reference in a new issue