From 057023094eb23b6eaa758a6b248a7503964283b6 Mon Sep 17 00:00:00 2001 From: giantpune Date: Wed, 18 May 2011 17:24:51 +0000 Subject: [PATCH] * use ++i instead of i++ for iterators git-svn-id: http://wiiqt.googlecode.com/svn/trunk@92 389f4c8b-5dfe-645f-db0e-df882bc27289 --- WiiQt/nandbin.cpp | 4 +--- WiiQt/nusdownloader.cpp | 5 ++--- WiiQt/u8.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/WiiQt/nandbin.cpp b/WiiQt/nandbin.cpp index e8f087e..a526c0a 100755 --- a/WiiQt/nandbin.cpp +++ b/WiiQt/nandbin.cpp @@ -37,7 +37,7 @@ bool NandBin::SetPath( const QString &path ) f.setFileName( path ); bool ret = ( f.exists() && #ifdef NAND_BIN_CAN_WRITE - f.open( QIODevice::ReadWrite ) ); + f.open( QIODevice::ReadWrite ) ); #else f.open( QIODevice::ReadOnly ) ); #endif @@ -237,8 +237,6 @@ bool NandBin::ExtractToDir( QTreeWidgetItem *item, const QString &path ) return false; } return ExtractFST( entry, path, true );//dont bother extracting this item's siblings - - return true; } QTreeWidgetItem *NandBin::CreateItem( QTreeWidgetItem *parent, const QString &name, quint32 size, quint16 entry, quint32 uid, quint32 gid, quint32 x3, quint8 attr, quint8 wtf) diff --git a/WiiQt/nusdownloader.cpp b/WiiQt/nusdownloader.cpp index d7aec87..30adfd1 100644 --- a/WiiQt/nusdownloader.cpp +++ b/WiiQt/nusdownloader.cpp @@ -107,9 +107,8 @@ void NusDownloader::StartNextJob() { tmdJob.name = "tmd"; dlJob = tmdJob; - QTimer::singleShot( 500, this, SLOT( StartDownload() ) ); + QTimer::singleShot( 50, this, SLOT( StartDownload() ) ); } - } //tries to read data for the job from the PC @@ -589,7 +588,7 @@ bool NusDownloader::GetUpdate( const QString & upd, bool decrypt ) while( i != titles.end() ) { Get( i.key(), decrypt, i.value() ); - i++; + ++i; } return true; } diff --git a/WiiQt/u8.cpp b/WiiQt/u8.cpp index 3501091..b184707 100644 --- a/WiiQt/u8.cpp +++ b/WiiQt/u8.cpp @@ -115,7 +115,7 @@ bool U8::RenameEntry( const QString &path, const QString &newName ) return ReplaceEntry( i.key(),i.value().GetData() ); //NOTE - after replacing the entry, "i" is no longer valid. keep that in mind when changing this code. its a bitch to track down this bug } - i++; + ++i; } //make sure the new filename doesnt already exist QString parentPath = path; @@ -294,7 +294,7 @@ bool U8::ReplaceEntry( const QString &path, const QByteArray &nba, bool autoComp return ReplaceEntry( chPath, ch.GetData() ); //NOTE - after replacing the entry, "i" is no longer valid. keep that in mind when changing this code. its a bitch to track down this bug } - i++; + ++i; } //find the entry to replace int entryToReplace = FindEntry( path ); @@ -397,7 +397,7 @@ bool U8::RemoveEntry( const QString &path ) return ReplaceEntry( chPath, ch.GetData() );//insert the new nested archive in this one //NOTE - after replacing the entry, "i" is no longer valid. keep that in mind when changing this code. its a bitch to track down this bug } - i++; + ++i; } //find the entry to delete int entryToDelete = FindEntry( path ); @@ -617,7 +617,7 @@ int U8::AddEntry( const QString &path, int type, const QByteArray &newData ) //qDebug() << "done replacing the child entry in this archive, finding the index to return (" << thisPath << ")"; return FindEntry( thisPath );//just return the index of the nested archive } - i++; + ++i; } //make sure this path doesnt already exist @@ -1124,7 +1124,7 @@ const QByteArray U8::GetData( const QString &str, bool onlyPayload ) subPath.remove( 0, i.key().size() + 1 );//remove the path of the archive itself + the slash return i.value().GetData( subPath, onlyPayload ); } - i++; + ++i; } int index = FindEntry( str ); if( index < 0 )