diff options
Diffstat (limited to 'src/resources/db')
30 files changed, 93 insertions, 93 deletions
diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp index 3bc8f8a2c..4502b93f8 100644 --- a/src/resources/db/avatardb.cpp +++ b/src/resources/db/avatardb.cpp @@ -50,7 +50,7 @@ void AvatarDB::load() logger->log1("Initializing avatar database..."); loadXmlFile(paths.getStringValue("avatarsFile"), SkipError_false); loadXmlFile(paths.getStringValue("avatarsPatchFile"), SkipError_true); - loadXmlDir("avatarsPatchDir", loadXmlFile); + loadXmlDir("avatarsPatchDir", loadXmlFile) } void AvatarDB::loadXmlFile(const std::string &fileName, diff --git a/src/resources/db/clandb.cpp b/src/resources/db/clandb.cpp index c613067e3..52959e4f9 100644 --- a/src/resources/db/clandb.cpp +++ b/src/resources/db/clandb.cpp @@ -50,7 +50,7 @@ void ClanDb::load() logger->log1("Initializing clans database..."); loadXmlFile(paths.getStringValue("clansFile"), SkipError_false); loadXmlFile(paths.getStringValue("clansPatchFile"), SkipError_true); - loadXmlDir("clansPatchDir", loadXmlFile); + loadXmlDir("clansPatchDir", loadXmlFile) mLoaded = true; } @@ -90,7 +90,7 @@ void ClanDb::loadXmlFile(const std::string &fileName, ClanInfo *clanInfo = nullptr; if (mClansInfos.find(id) != mClansInfos.end()) { - reportAlways("ClanDb: Redefinition of clan ID %d", id); + reportAlways("ClanDb: Redefinition of clan ID %d", id) clanInfo = mClansInfos[id]; } if (clanInfo == nullptr) @@ -130,7 +130,7 @@ const ClanInfo *ClanDb::get(const int clanId) { reportAlways("ClanDb: Warning, unknown clan ID " "%d requested", - clanId); + clanId) return nullptr; } } diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp index 236c4d934..401f67ed2 100644 --- a/src/resources/db/colordb.cpp +++ b/src/resources/db/colordb.cpp @@ -67,7 +67,7 @@ void ColorDB::load() SkipError_false); loadColorLists(paths.getStringValue("itemColorsPatchFile"), SkipError_true); - loadXmlDir("itemColorsPatchDir", loadColorLists); + loadXmlDir("itemColorsPatchDir", loadColorLists) it = mColorLists.find("hair"); if (it != mColorLists.end()) @@ -95,7 +95,7 @@ void ColorDB::loadHair(const std::string &fileName, return; } - reportAlways("Found legacy hair.xml"); + reportAlways("Found legacy hair.xml") for_each_xml_child_node(node, root) { if (xmlNameEqual(node, "include")) @@ -113,7 +113,7 @@ void ColorDB::loadHair(const std::string &fileName, if (colors.find(id) != colors.end()) { reportAlways("ColorDB: Redefinition of dye ID %d", - toInt(id, int)); + toInt(id, int)) } colors[id] = ItemColorData(id, XML::langProperty(node, "name", ""), @@ -194,7 +194,7 @@ std::string &ColorDB::getHairColorName(const ItemColor id) const ColorListsIterator it = mColorLists.find("hair"); if (it == mColorLists.end()) { - reportAlways("ColorDB: Error, hair colors list empty"); + reportAlways("ColorDB: Error, hair colors list empty") return mFail; } @@ -203,7 +203,7 @@ std::string &ColorDB::getHairColorName(const ItemColor id) if (i == (*it).second.end()) { reportAlways("ColorDB: Error, unknown dye ID# %d", - toInt(id, int)); + toInt(id, int)) return mFail; } return i->second.name; diff --git a/src/resources/db/commandsdb.cpp b/src/resources/db/commandsdb.cpp index ab98e7402..8195205d9 100644 --- a/src/resources/db/commandsdb.cpp +++ b/src/resources/db/commandsdb.cpp @@ -45,7 +45,7 @@ void CommandsDB::load() SkipError_false); loadXmlFile(paths.getStringValue("defaultCommandsPatchFile"), SkipError_true); - loadXmlDir("defaultCommandsPatchDir", loadXmlFile); + loadXmlDir("defaultCommandsPatchDir", loadXmlFile) mLoaded = true; } diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp index cd921d05a..11f681bb1 100644 --- a/src/resources/db/deaddb.cpp +++ b/src/resources/db/deaddb.cpp @@ -44,7 +44,7 @@ void DeadDB::load() loadXmlFile(paths.getStringValue("deadMessagesFile"), SkipError_false); loadXmlFile(paths.getStringValue("deadMessagesPatchFile"), SkipError_true); - loadXmlDir("deadMessagesPatchDir", loadXmlFile); + loadXmlDir("deadMessagesPatchDir", loadXmlFile) mLoaded = true; } diff --git a/src/resources/db/elementaldb.cpp b/src/resources/db/elementaldb.cpp index 4263c930c..a1c55ef67 100644 --- a/src/resources/db/elementaldb.cpp +++ b/src/resources/db/elementaldb.cpp @@ -46,7 +46,7 @@ void ElementalDb::load() logger->log1("Initializing elemental database..."); loadXmlFile(paths.getStringValue("elementalsFile"), SkipError_false); loadXmlFile(paths.getStringValue("elementalsPatchFile"), SkipError_true); - loadXmlDir("elementalsPatchDir", loadXmlFile); + loadXmlDir("elementalsPatchDir", loadXmlFile) mLoaded = true; } @@ -145,7 +145,7 @@ BeingInfo *ElementalDb::get(const BeingTypeId id) { reportAlways("ElementalDb: Warning, unknown elemental ID " "%d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } } diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp index 05808170a..65a1e0179 100644 --- a/src/resources/db/emotedb.cpp +++ b/src/resources/db/emotedb.cpp @@ -63,7 +63,7 @@ void EmoteDB::load() mLastEmote = 0; loadXmlFile(paths.getStringValue("emotesFile"), SkipError_false); loadXmlFile(paths.getStringValue("emotesPatchFile"), SkipError_true); - loadXmlDir("emotesPatchDir", loadXmlFile); + loadXmlDir("emotesPatchDir", loadXmlFile) loadSpecialXmlFile("graphics/sprites/manaplus_emotes.xml", SkipError_false); @@ -106,7 +106,7 @@ void EmoteDB::loadXmlFile(const std::string &fileName, if (id == -1) { reportAlways("Emote Database: Emote with missing ID in %s!", - paths.getStringValue("emotesFile").c_str()); + paths.getStringValue("emotesFile").c_str()) continue; } EmoteInfo *currentInfo = nullptr; @@ -179,7 +179,7 @@ void EmoteDB::loadSpecialXmlFile(const std::string &fileName, if (id == -1) { reportAlways("Emote Database: Emote with missing ID in " - "manaplus_emotes.xml!"); + "manaplus_emotes.xml!") continue; } const int altId = XML::getProperty(emoteNode, "altid", -1); @@ -263,7 +263,7 @@ const EmoteInfo *EmoteDB::get(const int id, const bool allowNull) if (allowNull) return nullptr; reportAlways("EmoteDB: Warning, unknown emote ID %d requested", - id); + id) return &mUnknown; } return i->second; @@ -282,7 +282,7 @@ const EmoteInfo *EmoteDB::get2(int id, const bool allowNull) if (allowNull) return nullptr; reportAlways("EmoteDB: Warning, unknown emote ID %d requested", - id); + id) return &mUnknown; } return i->second; diff --git a/src/resources/db/groupdb.cpp b/src/resources/db/groupdb.cpp index ea7ad0853..62db6c684 100644 --- a/src/resources/db/groupdb.cpp +++ b/src/resources/db/groupdb.cpp @@ -51,7 +51,7 @@ void GroupDb::load() loadXmlFile(paths.getStringValue("groupsFile"), SkipError_false); loadXmlFile(paths.getStringValue("groupsPatchFile"), SkipError_true); - loadXmlDir("groupsPatchDir", loadXmlFile); + loadXmlDir("groupsPatchDir", loadXmlFile) mLoaded = true; } @@ -75,7 +75,7 @@ static ServerCommandTypeT parseCommand(const std::string &str, { reportAlways("GroupsDb: unknown command name: '%s' in group id '%d'.", str.c_str(), - id); + id) } return ServerCommandType::Max; @@ -103,7 +103,7 @@ static ServerPermissionTypeT parsePermission(const std::string &str, reportAlways("GroupsDb: unknown permission name: " "'%s' in group id '%d'.", str.c_str(), - id); + id) } return ServerPermissionType::Max; @@ -137,7 +137,7 @@ static ServerCommandEnable::Type parseUseFlag(const std::string &str, reportAlways("GroupsDb: unknown use flag: '%s' in group id '%d'." "Possible values 'self', 'other', 'both'.", str.c_str(), - id); + id) return ServerCommandEnable::No; } } @@ -234,7 +234,7 @@ static void parseInherit(XmlNodePtr groupNode, { reportAlways("Unknown inherit group id '%d' in group '%d'", id2, - id); + id) continue; } GroupInfo *const groupInfo2 = (*it2).second; @@ -271,7 +271,7 @@ void GroupDb::loadXmlFile(const std::string &fileName, else { reportAlways("GroupsDb: Error while loading %s!", - fileName.c_str()); + fileName.c_str()) } return; } @@ -292,7 +292,7 @@ void GroupDb::loadXmlFile(const std::string &fileName, -1); if (id < 0) { - reportAlways("Empty id field in GroupDb"); + reportAlways("Empty id field in GroupDb") continue; } GroupInfosIter it = mGroups.find(id); @@ -300,7 +300,7 @@ void GroupDb::loadXmlFile(const std::string &fileName, if (it != mGroups.end()) { reportAlways("GroupDb: group with id %d already added", - id); + id) group = (*it).second; } else @@ -345,7 +345,7 @@ const std::string &GroupDb::getName(const int id) GroupInfos::const_iterator it = mGroups.find(id); if (it == mGroups.end()) { - reportAlways("Unknown group id requested: %d", id); + reportAlways("Unknown group id requested: %d", id) return mEmptyGroup.name; } return (*it).second->name; @@ -356,7 +356,7 @@ const std::string &GroupDb::getLongName(const int id) GroupInfos::const_iterator it = mGroups.find(id); if (it == mGroups.end()) { - reportAlways("Unknown group id requested: %d", id); + reportAlways("Unknown group id requested: %d", id) return mEmptyGroup.longName; } return (*it).second->longName; @@ -367,7 +367,7 @@ bool GroupDb::getShowBadge(const int id) GroupInfos::const_iterator it = mGroups.find(id); if (it == mGroups.end()) { - reportAlways("Unknown group id requested: %d", id); + reportAlways("Unknown group id requested: %d", id) return mEmptyGroup.showBadge; } return (*it).second->showBadge; @@ -378,7 +378,7 @@ bool GroupDb::getHighlightName(const int id) GroupInfos::const_iterator it = mGroups.find(id); if (it == mGroups.end()) { - reportAlways("Unknown group id requested: %d", id); + reportAlways("Unknown group id requested: %d", id) return mEmptyGroup.highlightName; } return (*it).second->highlightName; @@ -389,7 +389,7 @@ const std::string &GroupDb::getBadge(const int id) GroupInfos::const_iterator it = mGroups.find(id); if (it == mGroups.end()) { - reportAlways("Unknown group id requested: %d", id); + reportAlways("Unknown group id requested: %d", id) return mEmptyGroup.badge; } return (*it).second->badge; @@ -400,7 +400,7 @@ const GroupInfo *GroupDb::getGroup(const int id) GroupInfos::const_iterator it = mGroups.find(id); if (it == mGroups.end()) { - reportAlways("Unknown group id requested: %d", id); + reportAlways("Unknown group id requested: %d", id) return &mEmptyGroup; } return (*it).second; diff --git a/src/resources/db/homunculusdb.cpp b/src/resources/db/homunculusdb.cpp index 0d45a3864..1bbec6815 100644 --- a/src/resources/db/homunculusdb.cpp +++ b/src/resources/db/homunculusdb.cpp @@ -47,7 +47,7 @@ void HomunculusDB::load() logger->log1("Initializing homunculus database..."); loadXmlFile(paths.getStringValue("homunculusesFile"), SkipError_false); loadXmlFile(paths.getStringValue("homunculusesPatchFile"), SkipError_true); - loadXmlDir("homunculusesPatchDir", loadXmlFile); + loadXmlDir("homunculusesPatchDir", loadXmlFile) mLoaded = true; } @@ -151,7 +151,7 @@ BeingInfo *HomunculusDB::get(const BeingTypeId id) { reportAlways("HomunculusDB: Warning, unknown homunculus ID " "%d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } } diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp index 56d646eba..f7d2b0173 100644 --- a/src/resources/db/horsedb.cpp +++ b/src/resources/db/horsedb.cpp @@ -77,7 +77,7 @@ void HorseDB::load() loadXmlFile(paths.getStringValue("horsesFile"), SkipError_false); loadXmlFile(paths.getStringValue("horsesPatchFile"), SkipError_true); - loadXmlDir("horsesPatchDir", loadXmlFile); + loadXmlDir("horsesPatchDir", loadXmlFile) mLoaded = true; } @@ -135,7 +135,7 @@ static void loadRiderOffset(XmlNodePtrConst node, if (dir == -1) { reportAlways("Wrong or missing horse rider direcion: %s", - dirName.c_str()); + dirName.c_str()) return; } HorseOffset &offset = currentInfo->offsets[dir]; @@ -180,7 +180,7 @@ void HorseDB::loadXmlFile(const std::string &fileName, if (id == -1) { reportAlways("Horse Database: Horse with missing ID in %s!", - paths.getStringValue("horsesFile").c_str()); + paths.getStringValue("horsesFile").c_str()) continue; } HorseInfo *currentInfo = nullptr; @@ -214,7 +214,7 @@ static void loadOffset(XmlNodePtrConst node, if (dir == -1) { reportAlways("Wrong or missing horse direcion: %s", - dirName.c_str()); + dirName.c_str()) return; } HorseOffset &offset = currentInfo->offsets[dir]; @@ -290,7 +290,7 @@ HorseInfo *HorseDB::get(const int id, const bool allowNull) if (allowNull) return nullptr; reportAlways("HorseDB: Warning, unknown horse ID %d requested", - id); + id) return &mUnknown; } return i->second; diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 78ac033a6..5fbc16a79 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -304,7 +304,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, if (id == 0) { reportAlways("ItemDB: Invalid or missing item ID in %s!", - fileName.c_str()); + fileName.c_str()) continue; } else if (mItemInfos.find(id) != mItemInfos.end()) @@ -403,7 +403,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, { reportAlways("Inherit item %d from not existing item %d", id, - inherit); + inherit) } } @@ -682,7 +682,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, if (attackRange == 0) { reportAlways("ItemDB: Missing attack range from weapon %i!", - id); + id) } } @@ -760,7 +760,7 @@ void ItemDB::unload() { logger->log1("Unloading item database..."); - delete2(mUnknown); + delete2(mUnknown) delete_all(mItemInfos); mItemInfos.clear(); @@ -798,7 +798,7 @@ const ItemInfo &ItemDB::get(const int id) if (i == mItemInfos.end()) { - reportAlways("ItemDB: Warning, unknown item ID# %d", id); + reportAlways("ItemDB: Warning, unknown item ID# %d", id) return *mUnknown; } @@ -818,7 +818,7 @@ const ItemInfo &ItemDB::get(const std::string &name) if (!name.empty()) { reportAlways("ItemDB: Warning, unknown item name \"%s\"", - name.c_str()); + name.c_str()) } return *mUnknown; } @@ -1000,7 +1000,7 @@ static void loadSoundRef(ItemInfo *const itemInfo, XmlNodeConstPtr node) else { reportAlways("ItemDB: Ignoring unknown sound event '%s'", - event.c_str()); + event.c_str()) } } diff --git a/src/resources/db/itemfielddb.cpp b/src/resources/db/itemfielddb.cpp index 76ad26036..ef289a1b4 100644 --- a/src/resources/db/itemfielddb.cpp +++ b/src/resources/db/itemfielddb.cpp @@ -47,7 +47,7 @@ void ItemFieldDb::load() loadXmlFile(paths.getStringValue("itemFieldsFile"), SkipError_false); loadXmlFile(paths.getStringValue("itemFieldsPatchFile"), SkipError_true); - loadXmlDir("itemFieldsPatchDir", loadXmlFile); + loadXmlDir("itemFieldsPatchDir", loadXmlFile) mLoaded = true; } @@ -65,7 +65,7 @@ static void loadFields(XmlNodeConstPtr groupNode, ""); if (name.empty()) { - reportAlways("Empty name field in ItemFieldDb"); + reportAlways("Empty name field in ItemFieldDb") continue; } const std::string description = XML::langProperty(node, @@ -73,7 +73,7 @@ static void loadFields(XmlNodeConstPtr groupNode, ""); if (description.empty()) { - reportAlways("Empty description field in ItemFieldDb"); + reportAlways("Empty description field in ItemFieldDb") continue; } const bool sign = XML::getBoolProperty(node, @@ -83,14 +83,14 @@ static void loadFields(XmlNodeConstPtr groupNode, { reportAlways( "Same field name detected in requeted and add groups: %s", - name.c_str()); + name.c_str()) continue; } if (fields1.find(name) != fields1.end()) { reportAlways( "Same field name detected: %s", - name.c_str()); + name.c_str()) continue; } fields1[name] = new ItemFieldType(name, diff --git a/src/resources/db/itemoptiondb.cpp b/src/resources/db/itemoptiondb.cpp index e983cd801..e66019a3d 100644 --- a/src/resources/db/itemoptiondb.cpp +++ b/src/resources/db/itemoptiondb.cpp @@ -45,7 +45,7 @@ void ItemOptionDb::load() logger->log1("Initializing item options database..."); loadXmlFile(paths.getStringValue("itemOptionsFile"), SkipError_false); loadXmlFile(paths.getStringValue("itemOptionsPatchFile"), SkipError_true); - loadXmlDir("itemOptionsPatchDir", loadXmlFile); + loadXmlDir("itemOptionsPatchDir", loadXmlFile) mLoaded = true; } @@ -99,7 +99,7 @@ void ItemOptionDb::loadXmlFile(const std::string &fileName, else { reportAlways("ItemFieldDb: Error while loading %s!", - fileName.c_str()); + fileName.c_str()) } return; } @@ -125,7 +125,7 @@ void ItemOptionDb::loadXmlFile(const std::string &fileName, 0); if (id <= 0) { - reportAlways("Empty id field in ItemOptionDb"); + reportAlways("Empty id field in ItemOptionDb") continue; } STD_VECTOR<ItemFieldType*> &options = mOptions[id]; diff --git a/src/resources/db/languagedb.cpp b/src/resources/db/languagedb.cpp index 92ae888de..5f162223a 100644 --- a/src/resources/db/languagedb.cpp +++ b/src/resources/db/languagedb.cpp @@ -42,7 +42,7 @@ void LanguageDb::load() logger->log1("Initializing languages database..."); loadXmlFile(paths.getStringValue("languagesFile"), SkipError_false); loadXmlFile(paths.getStringValue("languagesPatchFile"), SkipError_true); - loadXmlDir("languagesPatchDir", loadXmlFile); + loadXmlDir("languagesPatchDir", loadXmlFile) } void LanguageDb::loadXmlFile(const std::string &fileName, @@ -73,14 +73,14 @@ void LanguageDb::loadXmlFile(const std::string &fileName, const int id = XML::getProperty(node, "id", -1); if (id < 0) { - reportAlways("Missing lang id"); + reportAlways("Missing lang id") continue; } const std::string icon = XML::getProperty(node, "icon", ""); const std::string po = XML::getProperty(node, "po", ""); if (icon.empty()) { - reportAlways("LanguageDb: empty icon field"); + reportAlways("LanguageDb: empty icon field") } else { @@ -88,7 +88,7 @@ void LanguageDb::loadXmlFile(const std::string &fileName, } if (po.empty()) { - reportAlways("LanguageDb: empty po field"); + reportAlways("LanguageDb: empty po field") } else { diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp index 971fa4578..818c50a9d 100644 --- a/src/resources/db/mapdb.cpp +++ b/src/resources/db/mapdb.cpp @@ -53,11 +53,11 @@ void MapDB::load() SkipError_true); loadRemapXmlFile(paths.getStringValue("mapsRemapPatchFile"), SkipError_true); - loadXmlDir("mapsRemapPatchDir", loadRemapXmlFile); + loadXmlDir("mapsRemapPatchDir", loadRemapXmlFile) loadInfo(paths.getStringValue("mapsFile"), SkipError_false); loadInfo(paths.getStringValue("mapsPatchFile"), SkipError_true); - loadXmlDir("mapsPatchDir", loadInfo); + loadXmlDir("mapsPatchDir", loadInfo) mLoaded = true; } diff --git a/src/resources/db/mercenarydb.cpp b/src/resources/db/mercenarydb.cpp index 72e6b3837..97ce1d014 100644 --- a/src/resources/db/mercenarydb.cpp +++ b/src/resources/db/mercenarydb.cpp @@ -47,7 +47,7 @@ void MercenaryDB::load() logger->log1("Initializing mercenary database..."); loadXmlFile(paths.getStringValue("mercenariesFile"), SkipError_false); loadXmlFile(paths.getStringValue("mercenariesPatchFile"), SkipError_true); - loadXmlDir("mercenariesPatchDir", loadXmlFile); + loadXmlDir("mercenariesPatchDir", loadXmlFile) mLoaded = true; } @@ -149,7 +149,7 @@ BeingInfo *MercenaryDB::get(const BeingTypeId id) { reportAlways("MercenaryDB: Warning, unknown mercenary ID " "%d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } } diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp index 7e80fc393..b32264df7 100644 --- a/src/resources/db/moddb.cpp +++ b/src/resources/db/moddb.cpp @@ -45,7 +45,7 @@ void ModDB::load() logger->log1("Initializing mod database..."); loadXmlFile(paths.getStringValue("modsFile"), SkipError_false); loadXmlFile(paths.getStringValue("modsPatchFile"), SkipError_true); - loadXmlDir("modsPatchDir", loadXmlFile); + loadXmlDir("modsPatchDir", loadXmlFile) mLoaded = true; } diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp index 68bc40703..3141c1cf5 100644 --- a/src/resources/db/monsterdb.cpp +++ b/src/resources/db/monsterdb.cpp @@ -51,7 +51,7 @@ void MonsterDB::load() logger->log1("Initializing monster database..."); loadXmlFile(paths.getStringValue("monstersFile"), SkipError_false); loadXmlFile(paths.getStringValue("monstersPatchFile"), SkipError_true); - loadXmlDir("monstersPatchDir", loadXmlFile); + loadXmlDir("monstersPatchDir", loadXmlFile) mLoaded = true; } @@ -152,7 +152,7 @@ BeingInfo *MonsterDB::get(const BeingTypeId id) if (i == mMonsterInfos.end()) { reportAlways("MonsterDB: Warning, unknown monster ID %d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } } diff --git a/src/resources/db/networkdb.cpp b/src/resources/db/networkdb.cpp index f44e94d75..3caebbc8a 100644 --- a/src/resources/db/networkdb.cpp +++ b/src/resources/db/networkdb.cpp @@ -44,7 +44,7 @@ void NetworkDb::load() logger->log1("Initializing network database..."); loadXmlFile(paths.getStringValue("networkFile"), SkipError_false); loadXmlFile(paths.getStringValue("networkPatchFile"), SkipError_true); - loadXmlDir("networkPatchDir", loadXmlFile); + loadXmlDir("networkPatchDir", loadXmlFile) mLoaded = true; } diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp index 3f858ccc3..a647522d1 100644 --- a/src/resources/db/npcdb.cpp +++ b/src/resources/db/npcdb.cpp @@ -53,7 +53,7 @@ void NPCDB::load() loadXmlFile(paths.getStringValue("npcsFile"), SkipError_false); loadXmlFile(paths.getStringValue("npcsPatchFile"), SkipError_true); - loadXmlDir("npcsPatchDir", loadXmlFile); + loadXmlDir("npcsPatchDir", loadXmlFile) mLoaded = true; } @@ -92,7 +92,7 @@ void NPCDB::loadXmlFile(const std::string &fileName, if (id == BeingTypeId_zero) { reportAlways("NPC Database: NPC with missing ID in %s!", - paths.getStringValue("npcsFile").c_str()); + paths.getStringValue("npcsFile").c_str()) continue; } else if (mNPCInfos.find(id) != mNPCInfos.end()) @@ -127,7 +127,7 @@ void NPCDB::loadXmlFile(const std::string &fileName, { reportAlways("Not found currency '%s' for npc %d", currency.c_str(), - CAST_S32(id)); + CAST_S32(id)) } currentInfo->setCurrency(currency); @@ -191,7 +191,7 @@ BeingInfo *NPCDB::get(const BeingTypeId id) if (i == mNPCInfos.end()) { reportAlways("NPCDB: Warning, unknown NPC ID %d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } return i->second; diff --git a/src/resources/db/npcdialogdb.cpp b/src/resources/db/npcdialogdb.cpp index e2ec324ed..104884904 100644 --- a/src/resources/db/npcdialogdb.cpp +++ b/src/resources/db/npcdialogdb.cpp @@ -44,7 +44,7 @@ void NpcDialogDB::load() logger->log1("Loading npc dialog database..."); loadXmlFile(paths.getStringValue("npcDialogsFile"), SkipError_false); loadXmlFile(paths.getStringValue("npcDialogsPatchFile"), SkipError_true); - loadXmlDir("npcDialogsPatchDir", loadXmlFile); + loadXmlDir("npcDialogsPatchDir", loadXmlFile) mLoaded = true; } @@ -74,7 +74,7 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog, button->image = XML::getProperty(childNode, "image", ""); if (button->name.empty() && button->image.empty()) { - reportAlways("Error: npc button without name or image"); + reportAlways("Error: npc button without name or image") delete button; continue; } @@ -89,7 +89,7 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog, const std::string image = XML::getProperty(childNode, "image", ""); if (image.empty()) { - reportAlways("Error: no image attribute found in image tag."); + reportAlways("Error: no image attribute found in image tag.") continue; } NpcImageInfo *const imageInfo = new NpcImageInfo; @@ -105,7 +105,7 @@ static void loadNpcDialogMenu(NpcDialogInfo *const dialog, const std::string text = XML::getProperty(childNode, "text", ""); if (text.empty()) { - reportAlways("Error: no text attribute found in text tag."); + reportAlways("Error: no text attribute found in text tag.") continue; } NpcTextInfo *const textInfo = new NpcTextInfo; diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index 987f20389..fd61f20f5 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -60,7 +60,7 @@ void PaletteDB::loadPalette() } if (*it != "GIMP Palette") { - reportAlways("wrong GIMP palette file"); + reportAlways("wrong GIMP palette file") return; } ++ it; diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index c01e80d42..f1570ed08 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -49,7 +49,7 @@ void PETDB::load() logger->log1("Initializing PET database..."); loadXmlFile(paths.getStringValue("petsFile"), SkipError_false); loadXmlFile(paths.getStringValue("petsPatchFile"), SkipError_true); - loadXmlDir("petsPatchDir", loadXmlFile); + loadXmlDir("petsPatchDir", loadXmlFile) mLoaded = true; } @@ -88,7 +88,7 @@ void PETDB::loadXmlFile(const std::string &fileName, if (id == BeingTypeId_negOne) { reportAlways("PET Database: PET with missing ID in %s!", - paths.getStringValue("petsFile").c_str()); + paths.getStringValue("petsFile").c_str()) continue; } @@ -160,7 +160,7 @@ BeingInfo *PETDB::get(const BeingTypeId id) if (i == mPETInfos.end()) { reportAlways("PETDB: Warning, unknown PET ID %d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } return i->second; diff --git a/src/resources/db/questdb.cpp b/src/resources/db/questdb.cpp index 03d9bc31a..65d29f586 100644 --- a/src/resources/db/questdb.cpp +++ b/src/resources/db/questdb.cpp @@ -49,7 +49,7 @@ void QuestDb::load() logger->log1("Initializing quest database..."); loadXmlFile(paths.getStringValue("questsFile"), SkipError_false); loadXmlFile(paths.getStringValue("questsPatchFile"), SkipError_true); - loadXmlDir("questsPatchDir", loadXmlFile); + loadXmlDir("questsPatchDir", loadXmlFile) } static void loadQuest(const int var, diff --git a/src/resources/db/skillunitdb.cpp b/src/resources/db/skillunitdb.cpp index db7e3b2ed..130d40683 100644 --- a/src/resources/db/skillunitdb.cpp +++ b/src/resources/db/skillunitdb.cpp @@ -49,7 +49,7 @@ void SkillUnitDb::load() logger->log1("Initializing skill unit database..."); loadXmlFile(paths.getStringValue("skillUnitsFile"), SkipError_false); loadXmlFile(paths.getStringValue("skillUnitsPatchFile"), SkipError_true); - loadXmlDir("skillUnitsPatchDir", loadXmlFile); + loadXmlDir("skillUnitsPatchDir", loadXmlFile) mLoaded = true; } @@ -87,7 +87,7 @@ void SkillUnitDb::loadXmlFile(const std::string &fileName, if (id == BeingTypeId_negOne) { reportAlways("SkillUnitDb: skill unit with missing ID in %s!", - paths.getStringValue("skillUnitsFile").c_str()); + paths.getStringValue("skillUnitsFile").c_str()) continue; } @@ -154,7 +154,7 @@ BeingInfo *SkillUnitDb::get(const BeingTypeId id) { reportAlways("SkillUnitDb: Warning, unknown skill unit id " "%d requested", - toInt(id, int)); + toInt(id, int)) return BeingInfo::unknown; } return i->second; diff --git a/src/resources/db/sounddb.cpp b/src/resources/db/sounddb.cpp index 781f8915d..61149eb4e 100644 --- a/src/resources/db/sounddb.cpp +++ b/src/resources/db/sounddb.cpp @@ -42,7 +42,7 @@ void SoundDB::load() logger->log1("Initializing sound database..."); loadXmlFile(paths.getStringValue("soundsFile"), SkipError_false); loadXmlFile(paths.getStringValue("soundsPatchFile"), SkipError_true); - loadXmlDir("soundsPatchDir", loadXmlFile); + loadXmlDir("soundsPatchDir", loadXmlFile) } void SoundDB::loadXmlFile(const std::string &fileName, diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp index 2757c0085..88300203f 100644 --- a/src/resources/db/statdb.cpp +++ b/src/resources/db/statdb.cpp @@ -92,7 +92,7 @@ void StatDb::load() loadXmlFile(paths.getStringValue("statFile"), SkipError_false); loadXmlFile(paths.getStringValue("statPatchFile"), SkipError_true); - loadXmlDir("statPatchDir", loadXmlFile); + loadXmlDir("statPatchDir", loadXmlFile) mLoaded = true; } @@ -112,7 +112,7 @@ static void loadBasicStats(XmlNodeConstPtr rootNode) { reportAlways("Wrong attr or id for basic " "stat with name %s", - name.c_str()); + name.c_str()) continue; } const std::string tag = XML::getProperty(node, "tag", ""); @@ -150,7 +150,7 @@ static void loadStats(XmlNodeConstPtr rootNode, { reportAlways("Wrong attr or id for extended " "stat with name %s", - name.c_str()); + name.c_str()) continue; } stats.push_back(BasicStat(static_cast<AttributesT>(id), @@ -207,7 +207,7 @@ void StatDb::loadXmlFile(const std::string &fileName, std::string page = XML::langProperty(node, "name", ""); if (page.empty()) { - reportAlways("Page without name in stats.xml"); + reportAlways("Page without name in stats.xml") page = "Unknown"; } loadStats(node, page); @@ -218,7 +218,7 @@ void StatDb::loadXmlFile(const std::string &fileName, if (mBasicStats.empty() && mStats.empty()) { - reportAlways("StatDb: no stats found"); + reportAlways("StatDb: no stats found") addDefaultStats(); } } diff --git a/src/resources/db/statuseffectdb.cpp b/src/resources/db/statuseffectdb.cpp index 9bc5e4e95..0eb7c27a6 100644 --- a/src/resources/db/statuseffectdb.cpp +++ b/src/resources/db/statuseffectdb.cpp @@ -52,7 +52,7 @@ StatusEffect *StatusEffectDB::getStatusEffect(const int index, if (it != effects.end()) return (*it).second; reportAlways("Missing status effect: %d", - index); + index) return nullptr; } @@ -66,7 +66,7 @@ void StatusEffectDB::load() loadXmlFile(paths.getStringValue("statusEffectsFile"), SkipError_false); loadXmlFile(paths.getStringValue("statusEffectsPatchFile"), SkipError_true); - loadXmlDir("statusEffectsPatchDir", loadXmlFile); + loadXmlDir("statusEffectsPatchDir", loadXmlFile) mLoaded = true; } diff --git a/src/resources/db/textdb.cpp b/src/resources/db/textdb.cpp index b6a902382..7304ac249 100644 --- a/src/resources/db/textdb.cpp +++ b/src/resources/db/textdb.cpp @@ -39,7 +39,7 @@ void TextDb::load() logger->log1("Initializing text database..."); loadXmlFile(paths.getStringValue("textsFile"), SkipError_false); loadXmlFile(paths.getStringValue("textsPatchFile"), SkipError_true); - loadXmlDir("textsPatchDir", loadXmlFile); + loadXmlDir("textsPatchDir", loadXmlFile) } void TextDb::loadXmlFile(const std::string &fileName, diff --git a/src/resources/db/unitsdb.cpp b/src/resources/db/unitsdb.cpp index b56be8fec..c9514b640 100644 --- a/src/resources/db/unitsdb.cpp +++ b/src/resources/db/unitsdb.cpp @@ -113,7 +113,7 @@ void UnitsDb::load() loadXmlFile(paths.getStringValue("unitsFile"), SkipError_false); loadXmlFile(paths.getStringValue("unitsPatchFile"), SkipError_true); - loadXmlDir("unitsPatchDir", loadXmlFile); + loadXmlDir("unitsPatchDir", loadXmlFile) } void UnitsDb::unload() @@ -186,7 +186,7 @@ static void loadCurrencies(XmlNodePtr parentNode) const std::string name = XML::getProperty(node, "name", ""); if (name.empty()) { - reportAlways("Error: unknown currency name."); + reportAlways("Error: unknown currency name.") continue; } mCurrencies[name] = loadUnit(node); |