You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/components/esm
tri4ng1e d4d1703bcf
Some PVS-Studio and cppcheck fixes
cppcheck:
[apps/esmtool/record.cpp:697]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1126]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1138]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/niftest/niftest.cpp:36]: (performance) Function parameter 'filename' should be passed by reference.
[apps/niftest/niftest.cpp:41]: (performance) Function parameter 'filename' should be passed by reference.
[apps/opencs/model/prefs/boolsetting.cpp:25]: (warning) Possible leak in public function. The pointer 'mWidget' is not deallocated before it is allocated.
[apps/opencs/model/prefs/shortcuteventhandler.cpp:52]: (warning) Return value of std::remove() ignored. Elements remain in container.
[apps/openmw/mwstate/quicksavemanager.cpp:5]: (performance) Variable 'mSaveName' is assigned in constructor body. Consider performing initialization in initialization list.

PVS-Studio:
apps/opencs/model/filter/parser.cpp  582  warn  V560 A part of conditional expression is always true: allowPredefined.
apps/opencs/view/world/referencecreator.cpp  67  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/world/referencecreator.cpp  74  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !completed.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !error.empty().
apps/opencs/model/tools/pathgridcheck.cpp  32  err  V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 32, 34.
apps/opencs/model/world/refidadapterimp.cpp  1376  err  V547 Expression 'subColIndex < 3' is always true.

apps/openmw/mwgui/widgets.hpp  318  warn  V703 It is odd that the 'mEnableRepeat' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:318, MyGUI_ScrollBar.h:179.
apps/openmw/mwgui/widgets.hpp  319  warn  V703 It is odd that the 'mRepeatTriggerTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:319, MyGUI_ScrollBar.h:180.
apps/openmw/mwgui/widgets.hpp  320  warn  V703 It is odd that the 'mRepeatStepTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:320, MyGUI_ScrollBar.h:181
apps/openmw/mwmechanics/actors.cpp  1425  warn  V547 Expression '!detected' is always true.
apps/openmw/mwmechanics/character.cpp  2155  err  V547 Expression 'mode == 0' is always true.
apps/openmw/mwmechanics/character.cpp  1192  warn  V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.
apps/openmw/mwmechanics/character.cpp  521  warn  V560 A part of conditional expression is always true: (idle == mIdleState).
apps/openmw/mwmechanics/pathfinding.cpp  317  err  V547 Expression 'mPath.size() >= 2' is always true.
apps/openmw/mwscript/interpretercontext.cpp  409  warn  V560 A part of conditional expression is always false: rank > 9.
apps/openmw/mwgui/windowbase.cpp  28  warn  V560 A part of conditional expression is always true: !visible.
apps/openmw/mwgui/journalwindow.cpp  561  warn  V547 Expression '!mAllQuests' is always false.
apps/openmw/mwgui/referenceinterface.cpp  18  warn  V571 Recurring check. The '!mPtr.isEmpty()' condition was already verified in line 16.
apps/openmw/mwworld/scene.cpp  463  warn  V547 Expression 'adjustPlayerPos' is always true.
apps/openmw/mwworld/worldimp.cpp  409  err  V766 An item with the same key '"sCompanionShare"' has already been added.
apps/openmw/mwworld/cellstore.cpp  691  warn  V519 The 'state.mWaterLevel' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 689, 691.
apps/openmw/mwworld/weather.cpp  1125  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1123, 1125.
apps/openmw/mwworld/weather.cpp  1137  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1135, 1137.

apps/wizard/unshield/unshieldworker.cpp  475  warn  V728 An excessive check can be simplified. The '(A && B) || (!A && !B)' expression is equivalent to the 'bool(A) == bool(B)' expression.
apps/wizard/installationpage.cpp  163  warn  V735 Possibly an incorrect HTML. The "</p" closing tag was encountered, while the "</span" tag was expected.

components/fontloader/fontloader.cpp  427  err  V547 Expression 'i == 1' is always true.
components/nifosg/nifloader.cpp  282  warn  V519 The 'created' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 278, 282.
components/esm/loadregn.cpp  119  err  V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 112, 119.
components/esm/cellref.cpp  178  warn  V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 175, 178.
components/esmterrain/storage.cpp  235  warn  V560 A part of conditional expression is always true: colStart == 0.
components/esmterrain/storage.cpp  237  warn  V560 A part of conditional expression is always true: rowStart == 0.
7 years ago
..
activespells.cpp Savegame: store ActiveSpells 11 years ago
activespells.hpp Savegame: store ActiveSpells 11 years ago
aipackage.cpp Don't rely on subrecord order part 2 10 years ago
aipackage.hpp reverted mShouldRepeat back to unsigned char. 10 years ago
aisequence.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 8 years ago
aisequence.hpp Duration fixes for Follow and Escort 9 years ago
animationstate.cpp Do not use architecture dependent type size_t in esm format (Fixes #3633) 8 years ago
animationstate.hpp Do not use architecture dependent type size_t in esm format (Fixes #3633) 8 years ago
attr.cpp Handle werewolf stats 12 years ago
attr.hpp Handle werewolf stats 12 years ago
cellid.cpp Replace "sys::default" with ESM::CellId::sDefaultWorldspace 9 years ago
cellid.hpp Replace "sys::default" with ESM::CellId::sDefaultWorldspace 9 years ago
cellref.cpp Some PVS-Studio and cppcheck fixes 7 years ago
cellref.hpp Slight adjustments to disintegration fix 8 years ago
cellstate.cpp Remove empty line at the beginning of files 10 years ago
cellstate.hpp Feature #32: Implement respawn for containers, creatures and NPCs 11 years ago
containerstate.cpp Remove empty line at the beginning of files 10 years ago
containerstate.hpp store content of containers in saved game files 11 years ago
controlsstate.cpp Save controls state (Fixes #3598) 8 years ago
controlsstate.hpp Save controls state (Fixes #3598) 8 years ago
creaturelevliststate.cpp Feature #32: Implement respawn for containers, creatures and NPCs 11 years ago
creaturelevliststate.hpp Feature #32: Implement respawn for containers, creatures and NPCs 11 years ago
creaturestate.cpp Remove empty line at the beginning of files 10 years ago
creaturestate.hpp ESSImport: player is placed in correct cell, npc cellrefs work 10 years ago
creaturestats.cpp Disable hitAttemptActorId saving code for now 8 years ago
creaturestats.hpp Disable hitAttemptActorId saving code for now 8 years ago
custommarkerstate.cpp ESSImport: convert custom map markers, not working for interiors yet 10 years ago
custommarkerstate.hpp ESSImport: convert custom map markers, not working for interiors yet 10 years ago
debugprofile.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
debugprofile.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
defs.hpp Save controls state (Fixes #3598) 8 years ago
dialoguestate.cpp Remove empty line at the beginning of files 10 years ago
dialoguestate.hpp ESSImport: convert faction reactions and known dialogue topics 10 years ago
doorstate.cpp Savegame: store door movement state (Closes #747) 11 years ago
doorstate.hpp Savegame: store door movement state (Closes #747) 11 years ago
effectlist.cpp Don't rely on subrecord order part 2 10 years ago
effectlist.hpp Don't rely on subrecord order part 2 10 years ago
esmcommon.hpp Rewrite NAME_T into FIXED_STRING. 9 years ago
esmreader.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
esmreader.hpp Refine DELE handling in ESM records. Add position-independent DELE search 10 years ago
esmwriter.cpp Fix uninitialized values in ESMWriter::save 9 years ago
esmwriter.hpp Pass parameters by const reference 8 years ago
filter.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
filter.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
fogstate.cpp Savegame: store fog of war (Closes #1177) 11 years ago
fogstate.hpp Savegame: store fog of war (Closes #1177) 11 years ago
globalmap.cpp Fix global map markers being duplicated when cell is visited again 10 years ago
globalmap.hpp Fix global map markers being duplicated when cell is visited again 10 years ago
globalscript.cpp Remove empty line at the beginning of files 10 years ago
globalscript.hpp ESSImport: convert running global scripts 10 years ago
inventorystate.cpp Fix shadowing warnings 8 years ago
inventorystate.hpp Allows the same item to have multiple ancestors 9 years ago
journalentry.cpp Remove empty line at the beginning of files 10 years ago
journalentry.hpp Feature #764: Store the actor that gave the dialog response 11 years ago
loadacti.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadacti.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadalch.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadalch.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadappa.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadappa.hpp Fix reversed use of alembics and retorts 8 years ago
loadarmo.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadarmo.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadbody.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadbody.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadbook.cpp Update loadbook.cpp 8 years ago
loadbook.hpp Update loadbook.hpp 8 years ago
loadbsgn.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadbsgn.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadcell.cpp Replace "sys::default" with ESM::CellId::sDefaultWorldspace 9 years ago
loadcell.hpp Implement deletion of moved references (Bug #3471) 9 years ago
loadclas.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadclas.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadclot.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadclot.hpp Change mValue type for clothes to unsigned short (fixes #3960) 8 years ago
loadcont.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadcont.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadcrea.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadcrea.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loaddial.cpp More consistent wording of errors/warnings 8 years ago
loaddial.hpp Remove unused includes 10 years ago
loaddoor.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loaddoor.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadench.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadench.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadfact.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadfact.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadglob.cpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadglob.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadgmst.cpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadgmst.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadinfo.cpp Minor cleanup 9 years ago
loadinfo.hpp Minor cleanup 9 years ago
loadingr.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadingr.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadland.cpp Get rid of duplicate function, fix flag checking 7 years ago
loadland.hpp Get rid of duplicate function, fix flag checking 7 years ago
loadlevlist.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadlevlist.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadligh.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadligh.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadlock.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadlock.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadltex.cpp Replace nonconst getId with setId, add template specialization and specialized derived classes for LandTexture 7 years ago
loadltex.hpp Replace nonconst getId with setId, add template specialization and specialized derived classes for LandTexture 7 years ago
loadmgef.cpp ExtraSpell magic effect: a basic implementation 7 years ago
loadmgef.hpp Merge commit 'pull/upstream/678' into HEAD 9 years ago
loadmisc.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadmisc.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadnpc.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadnpc.hpp Remove redundant Services enum 7 years ago
loadpgrd.cpp Move pathgrid abstraction handling to save code. 9 years ago
loadpgrd.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadprob.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadprob.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadrace.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadrace.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadregn.cpp Some PVS-Studio and cppcheck fixes 7 years ago
loadregn.hpp Typo fix 9 years ago
loadrepa.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadrepa.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadscpt.cpp Log a warning if size in SCHD (script header) does not match SCDT (bytecode) size instead of failing 8 years ago
loadscpt.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadskil.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadskil.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadsndg.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadsndg.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadsoun.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadsoun.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadspel.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadspel.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadsscr.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadsscr.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadstat.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadstat.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
loadtes3.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadtes3.hpp loadtes3: don't pack() non-POD structs 7 years ago
loadweap.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
loadweap.hpp Make deleted flag a parameter of load/save methods (instead of a record member) in ESM records 10 years ago
locals.cpp Remove empty line at the beginning of files 10 years ago
locals.hpp store global script state in saved game files 11 years ago
magiceffects.cpp Store magic effect Base values in savegame (Fixes #1489) 11 years ago
magiceffects.hpp Store magic effect Base values in savegame (Fixes #1489) 11 years ago
npcstate.cpp Remove empty line at the beginning of files 10 years ago
npcstate.hpp ESSImport: player is placed in correct cell, npc cellrefs work 10 years ago
npcstats.cpp purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
npcstats.hpp Show correct class image in level-up dialog (Fixes #3443) 9 years ago
objectstate.cpp Save scripted animation state (Fixes #1931, #2150, #3393) 9 years ago
objectstate.hpp Save scripted animation state (Fixes #1931, #2150, #3393) 9 years ago
player.cpp Remove empty line at the beginning of files 10 years ago
player.hpp Loading/saving for player's original skills/attributes (prior to becoming a werewolf) 10 years ago
projectilestate.cpp ESS-Importer: Convert magic projectiles (Closes #2320) 7 years ago
projectilestate.hpp ESS-Importer: Convert magic projectiles (Closes #2320) 7 years ago
queststate.cpp Remove empty line at the beginning of files 10 years ago
queststate.hpp ESSImport: convert journal indices 10 years ago
quickkeys.cpp Savegame: store most of CreatureStats 11 years ago
quickkeys.hpp Move to esm component 11 years ago
records.hpp Remove some unused code, include cleanup 10 years ago
savedgame.cpp Process death events at the end of the death animation (Fixes #1873) 9 years ago
savedgame.hpp Use the format field instead of version field 10 years ago
spelllist.cpp Don't rely on subrecord order part 2 10 years ago
spelllist.hpp Don't rely on subrecord order part 2 10 years ago
spellstate.cpp Implement effect removal for abilities (Fixes #3455) 9 years ago
spellstate.hpp Implement effect removal for abilities (Fixes #3455) 9 years ago
statstate.cpp Instantiate struct as a struct 10 years ago
statstate.hpp Explicitly instantiate ESM::StatState 10 years ago
stolenitems.cpp Stolen item tracking overhaul part 2 (Fixes #2338) 10 years ago
stolenitems.hpp Stolen item tracking overhaul part 2 (Fixes #2338) 10 years ago
transport.cpp Rewrite NAME_T into FIXED_STRING. 9 years ago
transport.hpp Add travel service support for creatures (Fixes #2432) 10 years ago
util.hpp Remove unused includes 10 years ago
variant.cpp ESSImport: convert script local variables 10 years ago
variant.hpp ESSImport: convert script local variables 10 years ago
variantimp.cpp Remove empty line at the beginning of files 10 years ago
variantimp.hpp added variant class 12 years ago
weatherstate.cpp Refactor weather transitions to act more like MW 9 years ago
weatherstate.hpp Refactor weather transitions to act more like MW 9 years ago