Skip to content

Commit

Permalink
opt:refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Jan 27, 2024
1 parent 69191e4 commit 28924b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dict/mdx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class IndexedMdd: public BtreeIndexing::BtreeIndex
if ( links.empty() )
return false;

MdictParser::RecordInfo indexEntry;
MdictParser::RecordInfo indexEntry{};
vector< char > chunk;
// QMutexLocker _( &idxMutex );
const char * indexEntryPtr = chunks.getBlock( links[ 0 ].articleOffset, chunk );
Expand Down Expand Up @@ -1152,7 +1152,7 @@ void MdxDictionary::loadResourceFile( const wstring & resourceName, vector< char
File::loadFromFile( fn, data );
return;
}
for ( auto mddResource : mddResources ) {
for ( const auto& mddResource : mddResources ) {
if ( mddResource->loadFile( newResourceName, data ) )
break;
}
Expand Down

0 comments on commit 28924b5

Please sign in to comment.