mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +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.
|
/// 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 );
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
Loading…
Reference in a new issue