Fix for coverity defects

openmw-35
scrawl 10 years ago
parent c4dd10fe49
commit 697ab16ec5

@ -161,7 +161,7 @@ public:
while (matches.size())
{
int longestKeywordSize = 0;
typename std::vector<Match>::iterator longestKeyword;
typename std::vector<Match>::iterator longestKeyword = matches.begin();
for (typename std::vector<Match>::iterator it = matches.begin(); it != matches.end(); ++it)
{
int size = it->mEnd - it->mBeg;

@ -82,7 +82,7 @@ void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener)
} else if (n.val == ESM::REC_SKIL) {
mSkills.load (esm);
}
else if (n.val==ESM::REC_FILT || ESM::REC_DBGP)
else if (n.val==ESM::REC_FILT || n.val == ESM::REC_DBGP)
{
// ignore project file only records
esm.skipRecord();

@ -739,7 +739,8 @@ bool Wizard::UnshieldWorker::extractFile(Unshield *unshield, const QString &dest
// Ensure the target path exists
QDir dir;
dir.mkpath(path);
if (!dir.mkpath(path))
return false;
QString fileName(path);
fileName.append(QString::fromUtf8(unshield_file_name(unshield, index)));

Loading…
Cancel
Save