1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 01:49:54 +00:00
openmw-tes3mp/apps/openmw/mwmechanics
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.
2018-04-18 12:36:10 +00:00
..
activespells.cpp Dispel only effects from spells (bug #3995) 2017-08-15 09:35:29 +04:00
activespells.hpp Dispel only effects from spells (bug #3995) 2017-08-15 09:35:29 +04:00
actor.cpp MechanicsManager, frame update 2015-04-25 15:19:17 +02:00
actor.hpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
actors.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
actors.hpp Typofix: updateCrimePersuit -> ...Pursuit 2018-03-23 14:10:43 +02:00
actorutil.cpp Added MWMechanics::isPlayerInCombat() 2015-09-10 18:48:34 +12:00
actorutil.hpp actorutil.hpp includes mwworld/ptr.hpp 2015-09-11 18:43:06 +12:00
aiactivate.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
aiactivate.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aiavoiddoor.cpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aiavoiddoor.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aibreathe.cpp Added AiBreathe package (feature #1374) 2017-07-25 10:58:04 +04:00
aibreathe.hpp Added AiBreathe package (feature #1374) 2017-07-25 10:58:04 +04:00
aicombat.cpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
aicombat.hpp purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
aicombataction.cpp implement rateAmmo() function 2018-01-11 21:08:11 +04:00
aicombataction.hpp Combat AI: use WhenUsed enchantments 2017-08-05 12:18:38 +04:00
aiescort.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
aiescort.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aiface.cpp Implement Face instruction (Feature #1424) 2016-07-09 02:16:47 +02:00
aiface.hpp Implement Face instruction (Feature #1424) 2016-07-09 02:16:47 +02:00
aifollow.cpp AiFollow: add a threshold when turning to target 2017-08-17 22:52:34 +04:00
aifollow.hpp Don't make Command spells cancel AI packages 2017-01-12 00:07:22 +09:00
aipackage.cpp Restrict opening doors to bipedal actors (Fixes #4313) 2018-03-18 17:24:27 +03:00
aipackage.hpp AiWander: do not allow flying/swimming creatures to use pathgrid 2017-11-28 18:03:13 +04:00
aipursue.cpp Change abs to std::abs 2017-11-13 21:36:55 +01:00
aipursue.hpp Don't stack Ai packages (Fixes #3101, Fixes #3080, Fixes #2697) 2016-02-02 22:20:56 +01:00
aisequence.cpp Merge pull request #1326 from akortunov/spellpriority 2017-07-31 17:51:51 +00:00
aisequence.hpp Make guards that are attacked try to arrest player 2017-06-15 01:47:10 +09:00
aistate.hpp Remove BOOST_STATIC_ASSERT to fix clang warnings 2015-06-04 20:11:40 +02:00
aitravel.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
aitravel.hpp AiPackage: fix path recalc on cell change 2016-09-06 01:11:10 +03:00
aiwander.cpp AiWander: do not allow flying/swimming creatures to use pathgrid 2017-11-28 18:03:13 +04:00
aiwander.hpp AiWander fast forwarding improvements (bug #3638) 2017-11-11 15:31:06 +04:00
alchemy.cpp Update alchemy effects after every created potion (#4079) 2017-09-06 15:11:47 +04:00
alchemy.hpp Don't reveal unknown potion effects in alchemy window (Fixes #3146) 2016-02-02 22:50:11 +01:00
autocalcspell.cpp Move spell magicka cost calculation to standalone function 2017-07-24 21:11:59 +04:00
autocalcspell.hpp Show starting abilities, powers and spells in stat-review window (Fixes #2410) 2016-11-19 21:51:19 +01:00
character.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
character.hpp Don't update off-screen animations 2018-01-11 01:49:35 +00:00
combat.cpp Add vanilla enchanted weaponry behavior option, on by default (fixes #4136) 2018-03-31 11:46:23 +03:00
combat.hpp Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
coordinateconverter.cpp Fixed errors pointed out by Zini. 2015-09-12 14:17:46 +12:00
coordinateconverter.hpp Fixed errors pointed out by Zini. 2015-09-12 14:17:46 +12:00
creaturestats.cpp Disable hitAttemptActorId saving code for now 2017-02-10 06:26:32 +01:00
creaturestats.hpp Store mHitAttemptActorId in save files 2017-02-07 01:26:26 +09:00
difficultyscaling.cpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
difficultyscaling.hpp Implement difficulty scaling (Fixes #1505) 2014-07-20 16:38:20 +02:00
disease.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
drawstate.hpp Savegame: store most of CreatureStats 2014-05-12 21:37:36 +02:00
enchanting.cpp Remove missing souls, remove some runaway exceptions (Fixes #4111) 2018-03-08 23:38:04 +00:00
enchanting.hpp Pass parameters by const reference 2017-04-20 23:47:03 +09:00
levelledlist.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
magiceffects.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
magiceffects.hpp Fix various MSVC warnings 2015-02-15 20:10:21 -06:00
mechanicsmanagerimp.cpp Merge pull request #1638 2018-04-09 20:23:20 +00:00
mechanicsmanagerimp.hpp Merge pull request #1419 2017-11-27 21:13:11 +00:00
movement.hpp Readded collision objects and movement physics 2015-05-12 03:02:15 +02:00
npcstats.cpp Implement sBookSkillMessage GMST 2018-04-02 21:12:38 +03:00
npcstats.hpp Implement sBookSkillMessage GMST 2018-04-02 21:12:38 +03:00
objects.cpp More consistent wording of errors/warnings 2017-03-04 21:48:31 +01:00
objects.hpp Save scripted animation state (Fixes #1931, #2150, #3393) 2016-08-03 03:52:35 +02:00
obstacle.cpp AI: Check angle between actor and door 2017-07-31 19:28:02 +04:00
obstacle.hpp Added door detection based by ray casting 2017-07-03 22:08:29 +04:00
pathfinding.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
pathfinding.hpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
pathgrid.cpp http to https for supported urls (#1625) 2018-03-08 21:23:24 +01:00
pathgrid.hpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
pickpocket.cpp Move rng to components 2015-04-22 17:58:55 +02:00
pickpocket.hpp Implement pickpocket detection. Play a voiced dialogue entry when detected. 2014-01-07 03:01:33 +01:00
repair.cpp Added a special function for GUI sounds playing 2017-07-10 15:48:00 +04:00
repair.hpp Added PC repair feature 2013-03-23 08:16:46 +01:00
security.cpp Don't attempt to lock or unlock unsuitable objects (Fixes #2826) 2015-08-13 17:08:21 +02:00
security.hpp Cleanup Security class 2013-05-19 23:19:48 +02:00
spellcasting.cpp Merge pull request #1667 2018-04-09 20:23:38 +00:00
spellcasting.hpp Update magic effect particles after building new animation (bug #2254) 2018-03-19 10:43:22 +04:00
spellpriority.cpp Do not summon the bound bow if there is no suitable ammo 2018-01-11 21:08:30 +04:00
spellpriority.hpp Split weapons and spells rating code from combat actions 2017-08-01 09:05:35 +04:00
spells.cpp Cache magic effects in MWMechanics::Spells 2016-07-02 12:50:00 +02:00
spells.hpp Cache magic effects in MWMechanics::Spells 2016-07-02 12:50:00 +02:00
stat.cpp Change bounds behavior of stat script commands 2017-03-22 15:17:44 +09:00
stat.hpp Fix magicka and fatigue calculations from fortifying attributes 2016-06-25 19:21:49 +09:00
steering.cpp Fixed bug in smoothTurn() 2015-09-06 17:39:48 +12:00
steering.hpp Fixes for building with unity build 2015-09-24 15:21:42 +02:00
summoning.cpp Added a delay before summoned creature corpse despawning 2017-08-18 11:58:28 +04:00
summoning.hpp Added a delay before summoned creature corpse despawning 2017-08-18 11:58:28 +04:00
trading.cpp Fix selling success chance (Fixes #3802) 2017-03-25 15:21:16 +01:00
trading.hpp Moved mechanics code from MWGui::TradeWindow to MWMechanics::Trading 2016-06-04 12:28:47 -04:00
weaponpriority.cpp implement rateAmmo() function 2018-01-11 21:08:11 +04:00
weaponpriority.hpp implement rateAmmo() function 2018-01-11 21:08:11 +04:00