1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:19:55 +00:00
openmw-tes3mp/apps/openmw/mwworld
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
..
action.cpp Make the PlayMode and PlayType enums scoped 2017-09-15 02:36:59 -07:00
action.hpp Adjustments to RemoveItem behavior 2017-04-13 22:33:13 +09:00
actionalchemy.cpp Added MWMechanics::isPlayerInCombat() 2015-09-10 18:48:34 +12:00
actionalchemy.hpp
actionapply.cpp Added MWMechanics::isPlayerInCombat() 2015-09-10 18:48:34 +12:00
actionapply.hpp Fix Potion use action removing the potion even when the action is not executed (Fixes #1521) 2014-06-17 04:05:20 +02:00
actiondoor.cpp
actiondoor.hpp
actioneat.cpp Remove redundant getId function 2015-12-18 16:58:38 +01:00
actioneat.hpp
actionequip.cpp Fix crash when onPcEquip script removes the equipped item (Fixes #3016) 2015-11-24 22:55:17 +01:00
actionequip.hpp
actionopen.cpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionopen.hpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionread.cpp Implement sBookSkillMessage GMST 2018-04-02 21:12:38 +03:00
actionread.hpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionrepair.cpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionrepair.hpp
actionsoulgem.cpp Added MWMechanics::isPlayerInCombat() 2015-09-10 18:48:34 +12:00
actionsoulgem.hpp
actiontake.cpp Update reference of the interpreter context when an Activate results in a take action (Fixes #3727) 2017-01-18 21:57:50 +01:00
actiontake.hpp
actiontalk.cpp Refactor dialogue GUI to talk to the dialogue manager, not the other way around and not both ways. 2017-09-25 23:38:28 +02:00
actiontalk.hpp
actionteleport.cpp Reset fall height when teleporting (Fixes #2629) 2017-02-20 20:27:05 +01:00
actionteleport.hpp Removed "less" character from the documentation by the requested opportunity. 2016-12-26 21:46:43 +01:00
actiontrap.cpp Implement and use getDistanceToFacedObject() 2016-07-08 23:28:49 +09:00
actiontrap.hpp Play trap activation sound on trapped object, not actor 2016-07-10 21:39:53 +09:00
cellpreloader.cpp Add abort flag to TerrainPreloadItem 2017-03-14 21:28:57 +01:00
cellpreloader.hpp Fix issues caused by loading multiple views into the same terrain View 2017-03-14 20:27:55 +01:00
cellref.cpp Slight adjustments to disintegration fix 2016-12-09 19:55:26 -07:00
cellref.hpp Slight adjustments to disintegration fix 2016-12-09 19:55:26 -07:00
cellreflist.hpp Fix possible reference duplication when the refID is modified by a plugin (Bug #3471) 2016-07-22 03:58:23 +02:00
cells.cpp Makes cells cache size configurable 2017-05-25 13:09:40 +04:00
cells.hpp Several warning fixes 2015-01-23 15:34:47 +01:00
cellstore.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
cellstore.hpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
cellvisitors.hpp Rename CellStore Functor to Visitor 2015-12-06 18:13:04 +01:00
class.cpp purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
class.hpp Owned crosshair improvements (bug #2789) 2017-08-18 17:08:15 +04:00
containerstore.cpp Remove a redundant check 2018-03-30 00:02:52 +03:00
containerstore.hpp Unequip all items from dead corpse when take all items (bug #4095) 2017-09-22 12:32:47 +04:00
contentloader.hpp Escape content file names before sending them to the GUI 2017-08-25 10:05:56 +00:00
customdata.cpp Use the const version of CustomData::as* 2015-12-19 16:19:52 +01:00
customdata.hpp Use the const version of CustomData::as* 2015-12-19 16:19:52 +01:00
esmloader.cpp Silence -Wreorder warnings, and remove -Wno-reorder. 2015-05-21 22:46:44 -05:00
esmloader.hpp Reduce includes 2015-01-10 01:00:52 +01:00
esmstore.cpp Rewrite NAME_T into FIXED_STRING. 2016-05-07 23:27:33 +03:00
esmstore.hpp Explicitly instantiate MWWorld::Store 2015-07-09 19:22:04 +02:00
failedaction.cpp Play locked sounds on locked objects instead of actors 2016-08-10 21:31:14 +09:00
failedaction.hpp Play locked sounds on locked objects instead of actors 2016-08-10 21:31:14 +09:00
globals.cpp Rename to lowerCaseInPlace 2015-12-07 22:49:15 +01:00
globals.hpp Remove NAME handling from MWWorld::Globals 2015-07-10 00:29:40 +03:00
inventorystore.cpp Do not replace an equpped ring of the same value 2017-10-20 23:05:12 +04:00
inventorystore.hpp Remove item by id from InventoryStore 2017-10-06 10:54:25 +04:00
livecellref.cpp Remove missing souls, remove some runaway exceptions (Fixes #4111) 2018-03-08 23:38:04 +00:00
livecellref.hpp Pass a string by reference 2015-12-18 17:08:26 +01:00
localscripts.cpp More consistent wording of errors/warnings 2017-03-04 21:48:31 +01:00
localscripts.hpp Vanilla-compatible activate / onActivate (Fixes #1629) 2016-02-26 13:08:35 +01:00
manualref.cpp Added new method and variable to track float remainders of disintegration effections 2016-12-09 19:48:56 -07:00
manualref.hpp Move manualref code out of header 2015-02-09 15:01:49 +01:00
nullaction.hpp Add isNullAction() method to fix compiler warning 2016-06-11 18:26:20 +02:00
player.cpp Implement fWerewolfHealth GMST (fixes #4142) 2018-03-30 19:27:18 +03:00
player.hpp Implement fWerewolfHealth GMST (fixes #4142) 2018-03-30 19:27:18 +03:00
projectilemanager.cpp Correct projectile rotation 2017-11-23 20:27:22 +01:00
projectilemanager.hpp Make use of mEffectAnimationTime for projectile rotation 2017-11-23 15:14:15 +01:00
ptr.cpp Added ConstContainerStoreIterator 2017-02-18 13:47:18 +00:00
ptr.hpp Added ConstContainerStoreIterator 2017-02-18 13:47:18 +00:00
recordcmp.hpp Remove some unused code, include cleanup 2015-01-27 23:12:13 +01:00
refdata.cpp Reset activation flags when an object is copied (Fixes #3671, Fixes #3719) 2017-01-14 15:29:36 +01:00
refdata.hpp Save scripted animation state (Fixes #1931, #2150, #3393) 2016-08-03 03:52:35 +02:00
scene.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
scene.hpp Add 'prediction time' setting for cell/terrain pre-loading 2017-07-19 16:44:37 +02:00
store.cpp Remove the word "interior" from cell not found message 2018-03-07 19:57:54 -06:00
store.hpp Don't call Store::setUp() unnecessarily 2018-02-13 00:38:55 +00:00
timestamp.cpp Correct an error in the timestamp subtracting logic (Fixes #3105) 2015-12-26 00:26:13 +01:00
timestamp.hpp fixed warning C4099: 2015-03-06 21:36:42 +13:00
weather.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
weather.hpp Merge pull request #1473 2018-04-09 20:23:43 +00:00
worldimp.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
worldimp.hpp Merge pull request #1634 2018-03-20 22:48:20 +00:00