From c0fc615cd6472c87854354089700a2719b42702b Mon Sep 17 00:00:00 2001 From: Atahualpa Date: Wed, 20 Jun 2018 11:29:38 +0200 Subject: [PATCH] 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. --- apps/opencs/model/tools/birthsigncheck.cpp | 4 +- apps/opencs/model/tools/bodypartcheck.cpp | 4 +- apps/opencs/model/tools/classcheck.cpp | 4 +- apps/opencs/model/tools/factioncheck.cpp | 4 +- apps/opencs/model/tools/gmstcheck.cpp | 4 +- apps/opencs/model/tools/journalcheck.cpp | 6 +-- apps/opencs/model/tools/magiceffectcheck.cpp | 4 +- apps/opencs/model/tools/pathgridcheck.cpp | 4 +- apps/opencs/model/tools/racecheck.cpp | 4 +- .../opencs/model/tools/referenceablecheck.cpp | 42 +++++++++---------- apps/opencs/model/tools/referencecheck.cpp | 4 +- apps/opencs/model/tools/regioncheck.cpp | 4 +- apps/opencs/model/tools/scriptcheck.cpp | 4 +- apps/opencs/model/tools/skillcheck.cpp | 4 +- apps/opencs/model/tools/soundcheck.cpp | 4 +- apps/opencs/model/tools/soundgencheck.cpp | 4 +- apps/opencs/model/tools/spellcheck.cpp | 4 +- apps/opencs/model/tools/startscriptcheck.cpp | 4 +- apps/opencs/model/tools/topicinfocheck.cpp | 4 +- apps/opencs/model/world/record.cpp | 7 +--- apps/opencs/model/world/record.hpp | 4 +- 21 files changed, 60 insertions(+), 67 deletions(-) diff --git a/apps/opencs/model/tools/birthsigncheck.cpp b/apps/opencs/model/tools/birthsigncheck.cpp index 5fe2479cd..fc2989307 100644 --- a/apps/opencs/model/tools/birthsigncheck.cpp +++ b/apps/opencs/model/tools/birthsigncheck.cpp @@ -12,7 +12,7 @@ CSMTools::BirthsignCheckStage::BirthsignCheckStage (const CSMWorld::IdCollection& birthsigns) : mBirthsigns (birthsigns) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::BirthsignCheckStage::setup() @@ -27,7 +27,7 @@ void CSMTools::BirthsignCheckStage::perform (int stage, CSMDoc::Messages& messag const CSMWorld::Record& record = mBirthsigns.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::BirthSign& birthsign = record.get(); diff --git a/apps/opencs/model/tools/bodypartcheck.cpp b/apps/opencs/model/tools/bodypartcheck.cpp index 8d19ef489..b5bd78f6c 100644 --- a/apps/opencs/model/tools/bodypartcheck.cpp +++ b/apps/opencs/model/tools/bodypartcheck.cpp @@ -10,7 +10,7 @@ CSMTools::BodyPartCheckStage::BodyPartCheckStage( mMeshes(meshes), mRaces(races) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::BodyPartCheckStage::setup() @@ -25,7 +25,7 @@ void CSMTools::BodyPartCheckStage::perform (int stage, CSMDoc::Messages &message const CSMWorld::Record &record = mBodyParts.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::BodyPart &bodyPart = record.get(); diff --git a/apps/opencs/model/tools/classcheck.cpp b/apps/opencs/model/tools/classcheck.cpp index 82007c860..89923a398 100644 --- a/apps/opencs/model/tools/classcheck.cpp +++ b/apps/opencs/model/tools/classcheck.cpp @@ -13,7 +13,7 @@ CSMTools::ClassCheckStage::ClassCheckStage (const CSMWorld::IdCollection& classes) : mClasses (classes) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::ClassCheckStage::setup() @@ -28,7 +28,7 @@ void CSMTools::ClassCheckStage::perform (int stage, CSMDoc::Messages& messages) const CSMWorld::Record& record = mClasses.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::Class& class_ = record.get(); diff --git a/apps/opencs/model/tools/factioncheck.cpp b/apps/opencs/model/tools/factioncheck.cpp index 2cf88fc0e..39073db5f 100644 --- a/apps/opencs/model/tools/factioncheck.cpp +++ b/apps/opencs/model/tools/factioncheck.cpp @@ -13,7 +13,7 @@ CSMTools::FactionCheckStage::FactionCheckStage (const CSMWorld::IdCollection& factions) : mFactions (factions) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::FactionCheckStage::setup() @@ -28,7 +28,7 @@ void CSMTools::FactionCheckStage::perform (int stage, CSMDoc::Messages& messages const CSMWorld::Record& record = mFactions.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::Faction& faction = record.get(); diff --git a/apps/opencs/model/tools/gmstcheck.cpp b/apps/opencs/model/tools/gmstcheck.cpp index e3b4777bf..7cd13e5c2 100644 --- a/apps/opencs/model/tools/gmstcheck.cpp +++ b/apps/opencs/model/tools/gmstcheck.cpp @@ -9,7 +9,7 @@ CSMTools::GmstCheckStage::GmstCheckStage(const CSMWorld::IdCollection& gameSettings) : mGameSettings(gameSettings) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::GmstCheckStage::setup() @@ -24,7 +24,7 @@ void CSMTools::GmstCheckStage::perform(int stage, CSMDoc::Messages& messages) const CSMWorld::Record& record = mGameSettings.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::GameSetting& gmst = record.get(); diff --git a/apps/opencs/model/tools/journalcheck.cpp b/apps/opencs/model/tools/journalcheck.cpp index a565f3786..4a7ab7d66 100644 --- a/apps/opencs/model/tools/journalcheck.cpp +++ b/apps/opencs/model/tools/journalcheck.cpp @@ -9,7 +9,7 @@ CSMTools::JournalCheckStage::JournalCheckStage(const CSMWorld::IdCollection &journalRecord = mJournals.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && journalRecord.isBaseOnly()) || journalRecord.isDeleted()) + if ((mIgnoreBaseRecords && journalRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || journalRecord.isDeleted()) return; const ESM::Dialogue &journal = journalRecord.get(); @@ -51,7 +51,7 @@ void CSMTools::JournalCheckStage::perform(int stage, CSMDoc::Messages& messages) } // Skip "Base" records (setting!) - if (mIgnoreBaseRecords && infoRecord.isBaseOnly()) + if (mIgnoreBaseRecords && infoRecord.mState == CSMWorld::RecordBase::State_BaseOnly) continue; if (journalInfo.mResponse.empty()) diff --git a/apps/opencs/model/tools/magiceffectcheck.cpp b/apps/opencs/model/tools/magiceffectcheck.cpp index f9e83aa23..531bd9e1d 100644 --- a/apps/opencs/model/tools/magiceffectcheck.cpp +++ b/apps/opencs/model/tools/magiceffectcheck.cpp @@ -80,7 +80,7 @@ CSMTools::MagicEffectCheckStage::MagicEffectCheckStage(const CSMWorld::IdCollect mIcons(icons), mTextures(textures) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::MagicEffectCheckStage::setup() @@ -95,7 +95,7 @@ void CSMTools::MagicEffectCheckStage::perform(int stage, CSMDoc::Messages &messa const CSMWorld::Record &record = mMagicEffects.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; ESM::MagicEffect effect = record.get(); diff --git a/apps/opencs/model/tools/pathgridcheck.cpp b/apps/opencs/model/tools/pathgridcheck.cpp index 53293fa79..6427bb119 100644 --- a/apps/opencs/model/tools/pathgridcheck.cpp +++ b/apps/opencs/model/tools/pathgridcheck.cpp @@ -13,7 +13,7 @@ CSMTools::PathgridCheckStage::PathgridCheckStage (const CSMWorld::SubCellCollection& pathgrids) : mPathgrids (pathgrids) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::PathgridCheckStage::setup() @@ -28,7 +28,7 @@ void CSMTools::PathgridCheckStage::perform (int stage, CSMDoc::Messages& message const CSMWorld::Record& record = mPathgrids.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const CSMWorld::Pathgrid& pathgrid = record.get(); diff --git a/apps/opencs/model/tools/racecheck.cpp b/apps/opencs/model/tools/racecheck.cpp index c7fd83224..38abfef18 100644 --- a/apps/opencs/model/tools/racecheck.cpp +++ b/apps/opencs/model/tools/racecheck.cpp @@ -22,7 +22,7 @@ void CSMTools::RaceCheckStage::performPerRecord (int stage, CSMDoc::Messages& me mPlayable = true; // Skip "Base" records (setting!) - if (mIgnoreBaseRecords && record.isBaseOnly()) + if (mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) return; 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& races) : mRaces (races), mPlayable (false) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::RaceCheckStage::setup() diff --git a/apps/opencs/model/tools/referenceablecheck.cpp b/apps/opencs/model/tools/referenceablecheck.cpp index 0c9a32b5c..3e8dc1188 100644 --- a/apps/opencs/model/tools/referenceablecheck.cpp +++ b/apps/opencs/model/tools/referenceablecheck.cpp @@ -20,7 +20,7 @@ CSMTools::ReferenceableCheckStage::ReferenceableCheckStage( mScripts(scripts), mPlayerPresent(false) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } void CSMTools::ReferenceableCheckStage::perform (int stage, CSMDoc::Messages& messages) @@ -244,7 +244,7 @@ void CSMTools::ReferenceableCheckStage::bookCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Book& book = (dynamic_cast& >(baseRecord)).get(); @@ -264,7 +264,7 @@ void CSMTools::ReferenceableCheckStage::activatorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Activator& activator = (dynamic_cast& >(baseRecord)).get(); @@ -286,7 +286,7 @@ void CSMTools::ReferenceableCheckStage::potionCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Potion& potion = (dynamic_cast& >(baseRecord)).get(); @@ -308,7 +308,7 @@ void CSMTools::ReferenceableCheckStage::apparatusCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Apparatus& apparatus = (dynamic_cast& >(baseRecord)).get(); @@ -330,7 +330,7 @@ void CSMTools::ReferenceableCheckStage::armorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Armor& armor = (dynamic_cast& >(baseRecord)).get(); @@ -358,7 +358,7 @@ void CSMTools::ReferenceableCheckStage::clothingCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Clothing& clothing = (dynamic_cast& >(baseRecord)).get(); @@ -377,7 +377,7 @@ void CSMTools::ReferenceableCheckStage::containerCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Container& container = (dynamic_cast& >(baseRecord)).get(); @@ -410,7 +410,7 @@ void CSMTools::ReferenceableCheckStage::creatureCheck ( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Creature& creature = (dynamic_cast&>(baseRecord)).get(); @@ -487,7 +487,7 @@ void CSMTools::ReferenceableCheckStage::doorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Door& door = (dynamic_cast&>(baseRecord)).get(); @@ -512,7 +512,7 @@ void CSMTools::ReferenceableCheckStage::ingredientCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Ingredient& ingredient = (dynamic_cast& >(baseRecord)).get(); @@ -532,7 +532,7 @@ void CSMTools::ReferenceableCheckStage::creaturesLevListCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::CreatureLevList& CreatureLevList = (dynamic_cast& >(baseRecord)).get(); @@ -549,7 +549,7 @@ void CSMTools::ReferenceableCheckStage::itemLevelledListCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::ItemLevList& ItemLevList = (dynamic_cast& >(baseRecord)).get(); @@ -565,7 +565,7 @@ void CSMTools::ReferenceableCheckStage::lightCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Light& light = (dynamic_cast& >(baseRecord)).get(); @@ -589,7 +589,7 @@ void CSMTools::ReferenceableCheckStage::lockpickCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Lockpick& lockpick = (dynamic_cast& >(baseRecord)).get(); @@ -611,7 +611,7 @@ void CSMTools::ReferenceableCheckStage::miscCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Miscellaneous& miscellaneous = (dynamic_cast& >(baseRecord)).get(); @@ -640,7 +640,7 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( mPlayerPresent = true; // Skip "Base" records (setting!) - if (mIgnoreBaseRecords && baseRecord.isBaseOnly()) + if (mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) return; short level(npc.mNpdt.mLevel); @@ -749,7 +749,7 @@ void CSMTools::ReferenceableCheckStage::weaponCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Weapon& weapon = (dynamic_cast& >(baseRecord)).get(); @@ -830,7 +830,7 @@ void CSMTools::ReferenceableCheckStage::probeCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Probe& probe = (dynamic_cast& >(baseRecord)).get(); @@ -850,7 +850,7 @@ void CSMTools::ReferenceableCheckStage::repairCheck ( const CSMWorld::RecordBase& baseRecord = records.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Repair& repair = (dynamic_cast& >(baseRecord)).get(); @@ -870,7 +870,7 @@ void CSMTools::ReferenceableCheckStage::staticCheck ( const CSMWorld::RecordBase& baseRecord = records.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && baseRecord.isBaseOnly()) || baseRecord.isDeleted()) + if ((mIgnoreBaseRecords && baseRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || baseRecord.isDeleted()) return; const ESM::Static& staticElement = (dynamic_cast& >(baseRecord)).get(); diff --git a/apps/opencs/model/tools/referencecheck.cpp b/apps/opencs/model/tools/referencecheck.cpp index 347a8a399..447238be4 100644 --- a/apps/opencs/model/tools/referencecheck.cpp +++ b/apps/opencs/model/tools/referencecheck.cpp @@ -14,7 +14,7 @@ CSMTools::ReferenceCheckStage::ReferenceCheckStage( mCells(cells), mFactions(factions) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } 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& record = mReferences.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const CSMWorld::CellRef& cellRef = record.get(); diff --git a/apps/opencs/model/tools/regioncheck.cpp b/apps/opencs/model/tools/regioncheck.cpp index 45b311414..f21253090 100644 --- a/apps/opencs/model/tools/regioncheck.cpp +++ b/apps/opencs/model/tools/regioncheck.cpp @@ -12,7 +12,7 @@ CSMTools::RegionCheckStage::RegionCheckStage (const CSMWorld::IdCollection& regions) : mRegions (regions) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::RegionCheckStage::setup() @@ -27,7 +27,7 @@ void CSMTools::RegionCheckStage::perform (int stage, CSMDoc::Messages& messages) const CSMWorld::Record& record = mRegions.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::Region& region = record.get(); diff --git a/apps/opencs/model/tools/scriptcheck.cpp b/apps/opencs/model/tools/scriptcheck.cpp index bf5d48f65..d3c6221cd 100644 --- a/apps/opencs/model/tools/scriptcheck.cpp +++ b/apps/opencs/model/tools/scriptcheck.cpp @@ -61,7 +61,7 @@ CSMTools::ScriptCheckStage::ScriptCheckStage (const CSMDoc::Document& document) Compiler::registerExtensions (mExtensions); mContext.setExtensions (&mExtensions); - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::ScriptCheckStage::setup() @@ -96,7 +96,7 @@ void CSMTools::ScriptCheckStage::perform (int stage, CSMDoc::Messages& messages) return; // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; mMessages = &messages; diff --git a/apps/opencs/model/tools/skillcheck.cpp b/apps/opencs/model/tools/skillcheck.cpp index 2214ec11a..b34d18e2a 100644 --- a/apps/opencs/model/tools/skillcheck.cpp +++ b/apps/opencs/model/tools/skillcheck.cpp @@ -11,7 +11,7 @@ CSMTools::SkillCheckStage::SkillCheckStage (const CSMWorld::IdCollection& skills) : mSkills (skills) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::SkillCheckStage::setup() @@ -26,7 +26,7 @@ void CSMTools::SkillCheckStage::perform (int stage, CSMDoc::Messages& messages) const CSMWorld::Record& record = mSkills.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::Skill& skill = record.get(); diff --git a/apps/opencs/model/tools/soundcheck.cpp b/apps/opencs/model/tools/soundcheck.cpp index b21341333..b84453b5c 100644 --- a/apps/opencs/model/tools/soundcheck.cpp +++ b/apps/opencs/model/tools/soundcheck.cpp @@ -11,7 +11,7 @@ CSMTools::SoundCheckStage::SoundCheckStage (const CSMWorld::IdCollection& sounds) : mSounds (sounds) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::SoundCheckStage::setup() @@ -26,7 +26,7 @@ void CSMTools::SoundCheckStage::perform (int stage, CSMDoc::Messages& messages) const CSMWorld::Record& record = mSounds.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::Sound& sound = record.get(); diff --git a/apps/opencs/model/tools/soundgencheck.cpp b/apps/opencs/model/tools/soundgencheck.cpp index acd245016..3692259ce 100644 --- a/apps/opencs/model/tools/soundgencheck.cpp +++ b/apps/opencs/model/tools/soundgencheck.cpp @@ -14,7 +14,7 @@ CSMTools::SoundGenCheckStage::SoundGenCheckStage(const CSMWorld::IdCollection &record = mSoundGens.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::SoundGenerator& soundGen = record.get(); diff --git a/apps/opencs/model/tools/spellcheck.cpp b/apps/opencs/model/tools/spellcheck.cpp index 6fb38138b..3e59f0d9a 100644 --- a/apps/opencs/model/tools/spellcheck.cpp +++ b/apps/opencs/model/tools/spellcheck.cpp @@ -12,7 +12,7 @@ CSMTools::SpellCheckStage::SpellCheckStage (const CSMWorld::IdCollection& spells) : mSpells (spells) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::SpellCheckStage::setup() @@ -27,7 +27,7 @@ void CSMTools::SpellCheckStage::perform (int stage, CSMDoc::Messages& messages) const CSMWorld::Record& record = mSpells.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; const ESM::Spell& spell = record.get(); diff --git a/apps/opencs/model/tools/startscriptcheck.cpp b/apps/opencs/model/tools/startscriptcheck.cpp index 64c1c9209..b1d92380b 100644 --- a/apps/opencs/model/tools/startscriptcheck.cpp +++ b/apps/opencs/model/tools/startscriptcheck.cpp @@ -9,7 +9,7 @@ CSMTools::StartScriptCheckStage::StartScriptCheckStage ( const CSMWorld::IdCollection& scripts) : mStartScripts (startScripts), mScripts (scripts) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } 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& record = mStartScripts.getRecord (stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && record.isBaseOnly()) || record.isDeleted()) + if ((mIgnoreBaseRecords && record.mState == CSMWorld::RecordBase::State_BaseOnly) || record.isDeleted()) return; std::string scriptId = record.get().mId; diff --git a/apps/opencs/model/tools/topicinfocheck.cpp b/apps/opencs/model/tools/topicinfocheck.cpp index 69ebec96b..ac1f596ae 100644 --- a/apps/opencs/model/tools/topicinfocheck.cpp +++ b/apps/opencs/model/tools/topicinfocheck.cpp @@ -32,7 +32,7 @@ CSMTools::TopicInfoCheckStage::TopicInfoCheckStage( mReferencables(referencables), mSoundFiles(soundFiles) { - mIgnoreBaseRecords = CSMPrefs::get()["Reports"]["ignore-base-records"].isTrue(); + mIgnoreBaseRecords = false; } int CSMTools::TopicInfoCheckStage::setup() @@ -81,7 +81,7 @@ void CSMTools::TopicInfoCheckStage::perform(int stage, CSMDoc::Messages& message const CSMWorld::Record& infoRecord = mTopicInfos.getRecord(stage); // Skip "Base" records (setting!) and "Deleted" records - if ((mIgnoreBaseRecords && infoRecord.isBaseOnly()) || infoRecord.isDeleted()) + if ((mIgnoreBaseRecords && infoRecord.mState == CSMWorld::RecordBase::State_BaseOnly) || infoRecord.isDeleted()) return; const CSMWorld::Info& topicInfo = infoRecord.get(); diff --git a/apps/opencs/model/world/record.cpp b/apps/opencs/model/world/record.cpp index 3291b0462..da1651f2b 100644 --- a/apps/opencs/model/world/record.cpp +++ b/apps/opencs/model/world/record.cpp @@ -2,11 +2,6 @@ CSMWorld::RecordBase::~RecordBase() {} -bool CSMWorld::RecordBase::isBaseOnly() const -{ - return mState == State_BaseOnly; -} - bool CSMWorld::RecordBase::isDeleted() const { return mState==State_Deleted || mState==State_Erased; @@ -22,4 +17,4 @@ bool CSMWorld::RecordBase::isErased() const bool CSMWorld::RecordBase::isModified() const { return mState==State_Modified || mState==State_ModifiedOnly; -} +} \ No newline at end of file diff --git a/apps/opencs/model/world/record.hpp b/apps/opencs/model/world/record.hpp index 0468bf8e7..0313f2e41 100644 --- a/apps/opencs/model/world/record.hpp +++ b/apps/opencs/model/world/record.hpp @@ -27,8 +27,6 @@ namespace CSMWorld virtual void assign (const RecordBase& record) = 0; ///< Will throw an exception if the types don't match. - bool isBaseOnly() const; - bool isDeleted() const; bool isErased() const; @@ -158,4 +156,4 @@ namespace CSMWorld } } -#endif +#endif \ No newline at end of file