Adds the option to ignore "Base" records when running the verifier. (fixes #4466)

Improves previous commit:
1. Initialise mIgnoreBase boolean member with FALSE.
2. Remove isBaseOnly() function and replace with direct use of Record member.
pull/456/head
Atahualpa 7 years ago
parent 9d61d76e92
commit c0fc615cd6

@ -12,7 +12,7 @@
CSMTools::BirthsignCheckStage::BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign>& birthsigns) CSMTools::BirthsignCheckStage::BirthsignCheckStage (const CSMWorld::IdCollection<ESM::BirthSign>& birthsigns)
: mBirthsigns (birthsigns) : mBirthsigns (birthsigns)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::BirthsignCheckStage::setup() int CSMTools::BirthsignCheckStage::setup()
@ -27,7 +27,7 @@ void CSMTools::BirthsignCheckStage::perform (int stage, CSMDoc::Messages& messag
const CSMWorld::Record<ESM::BirthSign>& record = mBirthsigns.getRecord (stage); const CSMWorld::Record<ESM::BirthSign>& record = mBirthsigns.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::BirthSign& birthsign = record.get(); const ESM::BirthSign& birthsign = record.get();

@ -10,7 +10,7 @@ CSMTools::BodyPartCheckStage::BodyPartCheckStage(
mMeshes(meshes), mMeshes(meshes),
mRaces(races) mRaces(races)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::BodyPartCheckStage::setup() int CSMTools::BodyPartCheckStage::setup()
@ -25,7 +25,7 @@ void CSMTools::BodyPartCheckStage::perform (int stage, CSMDoc::Messages &message
const CSMWorld::Record<ESM::BodyPart> &record = mBodyParts.getRecord(stage); const CSMWorld::Record<ESM::BodyPart> &record = mBodyParts.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::BodyPart &bodyPart = record.get(); const ESM::BodyPart &bodyPart = record.get();

@ -13,7 +13,7 @@
CSMTools::ClassCheckStage::ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes) CSMTools::ClassCheckStage::ClassCheckStage (const CSMWorld::IdCollection<ESM::Class>& classes)
: mClasses (classes) : mClasses (classes)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::ClassCheckStage::setup() int CSMTools::ClassCheckStage::setup()
@ -28,7 +28,7 @@ void CSMTools::ClassCheckStage::perform (int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::Class>& record = mClasses.getRecord (stage); const CSMWorld::Record<ESM::Class>& record = mClasses.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::Class& class_ = record.get(); const ESM::Class& class_ = record.get();

@ -13,7 +13,7 @@
CSMTools::FactionCheckStage::FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions) CSMTools::FactionCheckStage::FactionCheckStage (const CSMWorld::IdCollection<ESM::Faction>& factions)
: mFactions (factions) : mFactions (factions)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::FactionCheckStage::setup() int CSMTools::FactionCheckStage::setup()
@ -28,7 +28,7 @@ void CSMTools::FactionCheckStage::perform (int stage, CSMDoc::Messages& messages
const CSMWorld::Record<ESM::Faction>& record = mFactions.getRecord (stage); const CSMWorld::Record<ESM::Faction>& record = mFactions.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::Faction& faction = record.get(); const ESM::Faction& faction = record.get();

@ -9,7 +9,7 @@
CSMTools::GmstCheckStage::GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings) CSMTools::GmstCheckStage::GmstCheckStage(const CSMWorld::IdCollection<ESM::GameSetting>& gameSettings)
: mGameSettings(gameSettings) : mGameSettings(gameSettings)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::GmstCheckStage::setup() int CSMTools::GmstCheckStage::setup()
@ -24,7 +24,7 @@ void CSMTools::GmstCheckStage::perform(int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::GameSetting>& record = mGameSettings.getRecord (stage); const CSMWorld::Record<ESM::GameSetting>& record = mGameSettings.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::GameSetting& gmst = record.get(); const ESM::GameSetting& gmst = record.get();

@ -9,7 +9,7 @@ CSMTools::JournalCheckStage::JournalCheckStage(const CSMWorld::IdCollection<ESM:
const CSMWorld::InfoCollection& journalInfos) const CSMWorld::InfoCollection& journalInfos)
: mJournals(journals), mJournalInfos(journalInfos) : mJournals(journals), mJournalInfos(journalInfos)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::JournalCheckStage::setup() int CSMTools::JournalCheckStage::setup()
@ -24,7 +24,7 @@ void CSMTools::JournalCheckStage::perform(int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::Dialogue> &journalRecord = mJournals.getRecord(stage); const CSMWorld::Record<ESM::Dialogue> &journalRecord = mJournals.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && journalRecord.isBaseOnly()) || journalRecord.isDeleted()) if ((mIgnoreBaseRecords && journalRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || journalRecord.isDeleted())
return; return;
const ESM::Dialogue &journal = journalRecord.get(); const ESM::Dialogue &journal = journalRecord.get();
@ -51,7 +51,7 @@ void CSMTools::JournalCheckStage::perform(int stage, CSMDoc::Messages& messages)
} }
// Skip "Base" records (setting!) // Skip "Base" records (setting!)
if (mIgnoreBaseRecords && infoRecord.isBaseOnly()) if (mIgnoreBaseRecords && infoRecord.mState == CSMWorld::RecordBase::State_BaseOnly)
continue; continue;
if (journalInfo.mResponse.empty()) if (journalInfo.mResponse.empty())

@ -80,7 +80,7 @@ CSMTools::MagicEffectCheckStage::MagicEffectCheckStage(const CSMWorld::IdCollect
mIcons(icons), mIcons(icons),
mTextures(textures) mTextures(textures)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::MagicEffectCheckStage::setup() int CSMTools::MagicEffectCheckStage::setup()
@ -95,7 +95,7 @@ void CSMTools::MagicEffectCheckStage::perform(int stage, CSMDoc::Messages &messa
const CSMWorld::Record<ESM::MagicEffect> &record = mMagicEffects.getRecord(stage); const CSMWorld::Record<ESM::MagicEffect> &record = mMagicEffects.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
ESM::MagicEffect effect = record.get(); ESM::MagicEffect effect = record.get();

@ -13,7 +13,7 @@
CSMTools::PathgridCheckStage::PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid>& pathgrids) CSMTools::PathgridCheckStage::PathgridCheckStage (const CSMWorld::SubCellCollection<CSMWorld::Pathgrid>& pathgrids)
: mPathgrids (pathgrids) : mPathgrids (pathgrids)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::PathgridCheckStage::setup() int CSMTools::PathgridCheckStage::setup()
@ -28,7 +28,7 @@ void CSMTools::PathgridCheckStage::perform (int stage, CSMDoc::Messages& message
const CSMWorld::Record<CSMWorld::Pathgrid>& record = mPathgrids.getRecord (stage); const CSMWorld::Record<CSMWorld::Pathgrid>& record = mPathgrids.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const CSMWorld::Pathgrid& pathgrid = record.get(); const CSMWorld::Pathgrid& pathgrid = record.get();

@ -22,7 +22,7 @@ void CSMTools::RaceCheckStage::performPerRecord (int stage, CSMDoc::Messages& me
mPlayable = true; mPlayable = true;
// Skip "Base" records (setting!) // Skip "Base" records (setting!)
if (mIgnoreBaseRecords && record.isBaseOnly()) if (mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly)
return; return;
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Race, race.mId); CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Race, race.mId);
@ -62,7 +62,7 @@ void CSMTools::RaceCheckStage::performFinal (CSMDoc::Messages& messages)
CSMTools::RaceCheckStage::RaceCheckStage (const CSMWorld::IdCollection<ESM::Race>& races) CSMTools::RaceCheckStage::RaceCheckStage (const CSMWorld::IdCollection<ESM::Race>& races)
: mRaces (races), mPlayable (false) : mRaces (races), mPlayable (false)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::RaceCheckStage::setup() int CSMTools::RaceCheckStage::setup()

@ -20,7 +20,7 @@ CSMTools::ReferenceableCheckStage::ReferenceableCheckStage(
mScripts(scripts), mScripts(scripts),
mPlayerPresent(false) mPlayerPresent(false)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
void CSMTools::ReferenceableCheckStage::perform (int stage, CSMDoc::Messages& messages) void CSMTools::ReferenceableCheckStage::perform (int stage, CSMDoc::Messages& messages)
@ -244,7 +244,7 @@ void CSMTools::ReferenceableCheckStage::bookCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Book& book = (dynamic_cast<const CSMWorld::Record<ESM::Book>& >(baseRecord)).get(); const ESM::Book& book = (dynamic_cast<const CSMWorld::Record<ESM::Book>& >(baseRecord)).get();
@ -264,7 +264,7 @@ void CSMTools::ReferenceableCheckStage::activatorCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Activator& activator = (dynamic_cast<const CSMWorld::Record<ESM::Activator>& >(baseRecord)).get(); const ESM::Activator& activator = (dynamic_cast<const CSMWorld::Record<ESM::Activator>& >(baseRecord)).get();
@ -286,7 +286,7 @@ void CSMTools::ReferenceableCheckStage::potionCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Potion& potion = (dynamic_cast<const CSMWorld::Record<ESM::Potion>& >(baseRecord)).get(); const ESM::Potion& potion = (dynamic_cast<const CSMWorld::Record<ESM::Potion>& >(baseRecord)).get();
@ -308,7 +308,7 @@ void CSMTools::ReferenceableCheckStage::apparatusCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Apparatus& apparatus = (dynamic_cast<const CSMWorld::Record<ESM::Apparatus>& >(baseRecord)).get(); const ESM::Apparatus& apparatus = (dynamic_cast<const CSMWorld::Record<ESM::Apparatus>& >(baseRecord)).get();
@ -330,7 +330,7 @@ void CSMTools::ReferenceableCheckStage::armorCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Armor& armor = (dynamic_cast<const CSMWorld::Record<ESM::Armor>& >(baseRecord)).get(); const ESM::Armor& armor = (dynamic_cast<const CSMWorld::Record<ESM::Armor>& >(baseRecord)).get();
@ -358,7 +358,7 @@ void CSMTools::ReferenceableCheckStage::clothingCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Clothing& clothing = (dynamic_cast<const CSMWorld::Record<ESM::Clothing>& >(baseRecord)).get(); const ESM::Clothing& clothing = (dynamic_cast<const CSMWorld::Record<ESM::Clothing>& >(baseRecord)).get();
@ -377,7 +377,7 @@ void CSMTools::ReferenceableCheckStage::containerCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Container& container = (dynamic_cast<const CSMWorld::Record<ESM::Container>& >(baseRecord)).get(); const ESM::Container& container = (dynamic_cast<const CSMWorld::Record<ESM::Container>& >(baseRecord)).get();
@ -410,7 +410,7 @@ void CSMTools::ReferenceableCheckStage::creatureCheck (
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Creature& creature = (dynamic_cast<const CSMWorld::Record<ESM::Creature>&>(baseRecord)).get(); const ESM::Creature& creature = (dynamic_cast<const CSMWorld::Record<ESM::Creature>&>(baseRecord)).get();
@ -487,7 +487,7 @@ void CSMTools::ReferenceableCheckStage::doorCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Door& door = (dynamic_cast<const CSMWorld::Record<ESM::Door>&>(baseRecord)).get(); const ESM::Door& door = (dynamic_cast<const CSMWorld::Record<ESM::Door>&>(baseRecord)).get();
@ -512,7 +512,7 @@ void CSMTools::ReferenceableCheckStage::ingredientCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Ingredient& ingredient = (dynamic_cast<const CSMWorld::Record<ESM::Ingredient>& >(baseRecord)).get(); const ESM::Ingredient& ingredient = (dynamic_cast<const CSMWorld::Record<ESM::Ingredient>& >(baseRecord)).get();
@ -532,7 +532,7 @@ void CSMTools::ReferenceableCheckStage::creaturesLevListCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::CreatureLevList& CreatureLevList = (dynamic_cast<const CSMWorld::Record<ESM::CreatureLevList>& >(baseRecord)).get(); const ESM::CreatureLevList& CreatureLevList = (dynamic_cast<const CSMWorld::Record<ESM::CreatureLevList>& >(baseRecord)).get();
@ -549,7 +549,7 @@ void CSMTools::ReferenceableCheckStage::itemLevelledListCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::ItemLevList& ItemLevList = (dynamic_cast<const CSMWorld::Record<ESM::ItemLevList>& >(baseRecord)).get(); const ESM::ItemLevList& ItemLevList = (dynamic_cast<const CSMWorld::Record<ESM::ItemLevList>& >(baseRecord)).get();
@ -565,7 +565,7 @@ void CSMTools::ReferenceableCheckStage::lightCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Light& light = (dynamic_cast<const CSMWorld::Record<ESM::Light>& >(baseRecord)).get(); const ESM::Light& light = (dynamic_cast<const CSMWorld::Record<ESM::Light>& >(baseRecord)).get();
@ -589,7 +589,7 @@ void CSMTools::ReferenceableCheckStage::lockpickCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Lockpick& lockpick = (dynamic_cast<const CSMWorld::Record<ESM::Lockpick>& >(baseRecord)).get(); const ESM::Lockpick& lockpick = (dynamic_cast<const CSMWorld::Record<ESM::Lockpick>& >(baseRecord)).get();
@ -611,7 +611,7 @@ void CSMTools::ReferenceableCheckStage::miscCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Miscellaneous& miscellaneous = (dynamic_cast<const CSMWorld::Record<ESM::Miscellaneous>& >(baseRecord)).get(); const ESM::Miscellaneous& miscellaneous = (dynamic_cast<const CSMWorld::Record<ESM::Miscellaneous>& >(baseRecord)).get();
@ -640,7 +640,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck (
mPlayerPresent = true; mPlayerPresent = true;
// Skip "Base" records (setting!) // Skip "Base" records (setting!)
if (mIgnoreBaseRecords && baseRecord.isBaseOnly()) if (mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly)
return; return;
short level(npc.mNpdt.mLevel); short level(npc.mNpdt.mLevel);
@ -749,7 +749,7 @@ void CSMTools::ReferenceableCheckStage::weaponCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord (stage); const CSMWorld::RecordBase& baseRecord = records.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Weapon& weapon = (dynamic_cast<const CSMWorld::Record<ESM::Weapon>& >(baseRecord)).get(); const ESM::Weapon& weapon = (dynamic_cast<const CSMWorld::Record<ESM::Weapon>& >(baseRecord)).get();
@ -830,7 +830,7 @@ void CSMTools::ReferenceableCheckStage::probeCheck(
const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); const CSMWorld::RecordBase& baseRecord = records.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Probe& probe = (dynamic_cast<const CSMWorld::Record<ESM::Probe>& >(baseRecord)).get(); const ESM::Probe& probe = (dynamic_cast<const CSMWorld::Record<ESM::Probe>& >(baseRecord)).get();
@ -850,7 +850,7 @@ void CSMTools::ReferenceableCheckStage::repairCheck (
const CSMWorld::RecordBase& baseRecord = records.getRecord (stage); const CSMWorld::RecordBase& baseRecord = records.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Repair& repair = (dynamic_cast<const CSMWorld::Record<ESM::Repair>& >(baseRecord)).get(); const ESM::Repair& repair = (dynamic_cast<const CSMWorld::Record<ESM::Repair>& >(baseRecord)).get();
@ -870,7 +870,7 @@ void CSMTools::ReferenceableCheckStage::staticCheck (
const CSMWorld::RecordBase& baseRecord = records.getRecord (stage); const CSMWorld::RecordBase& baseRecord = records.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted())
return; return;
const ESM::Static& staticElement = (dynamic_cast<const CSMWorld::Record<ESM::Static>& >(baseRecord)).get(); const ESM::Static& staticElement = (dynamic_cast<const CSMWorld::Record<ESM::Static>& >(baseRecord)).get();

@ -14,7 +14,7 @@ CSMTools::ReferenceCheckStage::ReferenceCheckStage(
mCells(cells), mCells(cells),
mFactions(factions) mFactions(factions)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &messages) void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &messages)
@ -22,7 +22,7 @@ void CSMTools::ReferenceCheckStage::perform(int stage, CSMDoc::Messages &message
const CSMWorld::Record<CSMWorld::CellRef>& record = mReferences.getRecord(stage); const CSMWorld::Record<CSMWorld::CellRef>& record = mReferences.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const CSMWorld::CellRef& cellRef = record.get(); const CSMWorld::CellRef& cellRef = record.get();

@ -12,7 +12,7 @@
CSMTools::RegionCheckStage::RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions) CSMTools::RegionCheckStage::RegionCheckStage (const CSMWorld::IdCollection<ESM::Region>& regions)
: mRegions (regions) : mRegions (regions)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::RegionCheckStage::setup() int CSMTools::RegionCheckStage::setup()
@ -27,7 +27,7 @@ void CSMTools::RegionCheckStage::perform (int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::Region>& record = mRegions.getRecord (stage); const CSMWorld::Record<ESM::Region>& record = mRegions.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::Region& region = record.get(); const ESM::Region& region = record.get();

@ -61,7 +61,7 @@ CSMTools::ScriptCheckStage::ScriptCheckStage (const CSMDoc::Document& document)
Compiler::registerExtensions (mExtensions); Compiler::registerExtensions (mExtensions);
mContext.setExtensions (&mExtensions); mContext.setExtensions (&mExtensions);
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::ScriptCheckStage::setup() int CSMTools::ScriptCheckStage::setup()
@ -96,7 +96,7 @@ void CSMTools::ScriptCheckStage::perform (int stage, CSMDoc::Messages& messages)
return; return;
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
mMessages = &messages; mMessages = &messages;

@ -11,7 +11,7 @@
CSMTools::SkillCheckStage::SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills) CSMTools::SkillCheckStage::SkillCheckStage (const CSMWorld::IdCollection<ESM::Skill>& skills)
: mSkills (skills) : mSkills (skills)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::SkillCheckStage::setup() int CSMTools::SkillCheckStage::setup()
@ -26,7 +26,7 @@ void CSMTools::SkillCheckStage::perform (int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::Skill>& record = mSkills.getRecord (stage); const CSMWorld::Record<ESM::Skill>& record = mSkills.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::Skill& skill = record.get(); const ESM::Skill& skill = record.get();

@ -11,7 +11,7 @@
CSMTools::SoundCheckStage::SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds) CSMTools::SoundCheckStage::SoundCheckStage (const CSMWorld::IdCollection<ESM::Sound>& sounds)
: mSounds (sounds) : mSounds (sounds)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::SoundCheckStage::setup() int CSMTools::SoundCheckStage::setup()
@ -26,7 +26,7 @@ void CSMTools::SoundCheckStage::perform (int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::Sound>& record = mSounds.getRecord (stage); const CSMWorld::Record<ESM::Sound>& record = mSounds.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::Sound& sound = record.get(); const ESM::Sound& sound = record.get();

@ -14,7 +14,7 @@ CSMTools::SoundGenCheckStage::SoundGenCheckStage(const CSMWorld::IdCollection<ES
mSounds(sounds), mSounds(sounds),
mReferenceables(referenceables) mReferenceables(referenceables)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::SoundGenCheckStage::setup() int CSMTools::SoundGenCheckStage::setup()
@ -29,7 +29,7 @@ void CSMTools::SoundGenCheckStage::perform(int stage, CSMDoc::Messages &messages
const CSMWorld::Record<ESM::SoundGenerator> &record = mSoundGens.getRecord(stage); const CSMWorld::Record<ESM::SoundGenerator> &record = mSoundGens.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::SoundGenerator& soundGen = record.get(); const ESM::SoundGenerator& soundGen = record.get();

@ -12,7 +12,7 @@
CSMTools::SpellCheckStage::SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells) CSMTools::SpellCheckStage::SpellCheckStage (const CSMWorld::IdCollection<ESM::Spell>& spells)
: mSpells (spells) : mSpells (spells)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::SpellCheckStage::setup() int CSMTools::SpellCheckStage::setup()
@ -27,7 +27,7 @@ void CSMTools::SpellCheckStage::perform (int stage, CSMDoc::Messages& messages)
const CSMWorld::Record<ESM::Spell>& record = mSpells.getRecord (stage); const CSMWorld::Record<ESM::Spell>& record = mSpells.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
const ESM::Spell& spell = record.get(); const ESM::Spell& spell = record.get();

@ -9,7 +9,7 @@ CSMTools::StartScriptCheckStage::StartScriptCheckStage (
const CSMWorld::IdCollection<ESM::Script>& scripts) const CSMWorld::IdCollection<ESM::Script>& scripts)
: mStartScripts (startScripts), mScripts (scripts) : mStartScripts (startScripts), mScripts (scripts)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
void CSMTools::StartScriptCheckStage::perform(int stage, CSMDoc::Messages& messages) void CSMTools::StartScriptCheckStage::perform(int stage, CSMDoc::Messages& messages)
@ -17,7 +17,7 @@ void CSMTools::StartScriptCheckStage::perform(int stage, CSMDoc::Messages& messa
const CSMWorld::Record<ESM::StartScript>& record = mStartScripts.getRecord (stage); const CSMWorld::Record<ESM::StartScript>& record = mStartScripts.getRecord (stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted())
return; return;
std::string scriptId = record.get().mId; std::string scriptId = record.get().mId;

@ -32,7 +32,7 @@ CSMTools::TopicInfoCheckStage::TopicInfoCheckStage(
mReferencables(referencables), mReferencables(referencables),
mSoundFiles(soundFiles) mSoundFiles(soundFiles)
{ {
mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); mIgnoreBaseRecords = false;
} }
int CSMTools::TopicInfoCheckStage::setup() int CSMTools::TopicInfoCheckStage::setup()
@ -81,7 +81,7 @@ void CSMTools::TopicInfoCheckStage::perform(int stage, CSMDoc::Messages& message
const CSMWorld::Record<CSMWorld::Info>& infoRecord = mTopicInfos.getRecord(stage); const CSMWorld::Record<CSMWorld::Info>& infoRecord = mTopicInfos.getRecord(stage);
// Skip "Base" records (setting!) and "Deleted" records // Skip "Base" records (setting!) and "Deleted" records
if ((mIgnoreBaseRecords && infoRecord.isBaseOnly()) || infoRecord.isDeleted()) if ((mIgnoreBaseRecords && infoRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || infoRecord.isDeleted())
return; return;
const CSMWorld::Info& topicInfo = infoRecord.get(); const CSMWorld::Info& topicInfo = infoRecord.get();

@ -2,11 +2,6 @@
CSMWorld::RecordBase::~RecordBase() {} CSMWorld::RecordBase::~RecordBase() {}
bool CSMWorld::RecordBase::isBaseOnly() const
{
return mState == State_BaseOnly;
}
bool CSMWorld::RecordBase::isDeleted() const bool CSMWorld::RecordBase::isDeleted() const
{ {
return mState==State_Deleted || mState==State_Erased; return mState==State_Deleted || mState==State_Erased;

@ -27,8 +27,6 @@ namespace CSMWorld
virtual void assign (const RecordBase& record) = 0; virtual void assign (const RecordBase& record) = 0;
///< Will throw an exception if the types don't match. ///< Will throw an exception if the types don't match.
bool isBaseOnly() const;
bool isDeleted() const; bool isDeleted() const;
bool isErased() const; bool isErased() const;

Loading…
Cancel
Save