openmw-tes3coop/apps/opencs/view/world
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
..
bodypartcreator.cpp Editor: add creator for body parts 2017-03-30 08:20:43 -04:00
bodypartcreator.hpp Editor: add creator for body parts 2017-03-30 08:20:43 -04:00
cellcreator.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
cellcreator.hpp Add the proper getErrors() method to CellCreator. 2015-06-27 21:59:16 +03:00
colordelegate.cpp Fix region colors 2017-10-06 20:05:06 -04:00
colordelegate.hpp Rename ColorPickerDelegate to ColorDelegate 2015-06-12 23:09:31 +03:00
creator.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
creator.hpp Move touch command to creator, to allow customization and not break abstraction 2017-09-03 17:01:16 -04:00
datadisplaydelegate.cpp Fix cppcheck warnings 2016-01-03 20:19:38 +01:00
datadisplaydelegate.hpp Fix cppcheck warnings 2016-01-03 20:19:38 +01:00
dialoguecreator.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
dialoguecreator.hpp Rework creator factories to accept Document as a parameter 2015-06-18 22:59:40 +03:00
dialoguespinbox.cpp Allow wheel events in dialogue spin box types only when they have focus. Should resolve Feature #2585. 2015-05-29 05:44:35 +10:00
dialoguespinbox.hpp Allow wheel events in dialogue spin box types only when they have focus. Should resolve Feature #2585. 2015-05-29 05:44:35 +10:00
dialoguesubview.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
dialoguesubview.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
dragdroputils.cpp Add some drag'n'drop utils to work with TableMimeData 2015-06-21 17:08:10 +03:00
dragdroputils.hpp use a namespace instead of a class with only static functions 2015-06-24 17:29:47 +02:00
dragrecordtable.cpp Fix shadowing warnings 2016-10-15 00:12:46 +09:00
dragrecordtable.hpp DragRecordTable checks drag type before accepting it 2015-06-21 18:40:13 +03:00
enumdelegate.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
enumdelegate.hpp Refactor Enum- and DataDisplayDelegate code 2015-06-16 15:39:54 +03:00
extendedcommandconfigurator.cpp Add edit locking to ExtendedCommandConfigurator 2015-07-05 22:49:48 +03:00
extendedcommandconfigurator.hpp Add edit locking to ExtendedCommandConfigurator 2015-07-05 22:49:48 +03:00
genericcreator.cpp Fix potential segfault, cleanup, get rid of warnings. 2017-09-09 11:48:13 -04:00
genericcreator.hpp Tweaks to land loading, land cloning, terrain signals, placeholder land update handling 2017-09-08 00:51:46 -04:00
globalcreator.cpp Fix globals not being initialized with a valid type. 2016-08-09 00:17:41 -04:00
globalcreator.hpp added missing Q_OBJECT 2016-08-09 10:21:37 +02:00
idcompletiondelegate.cpp InfoCondition autocompletion 2016-02-22 15:48:25 -05:00
idcompletiondelegate.hpp Fix the mistyping header guard in the idcompletiondelegate.hpp 2015-05-31 18:22:43 +03:00
idtypedelegate.cpp second batch of changing over user settings usage to the new system 2015-12-14 17:38:33 +01:00
idtypedelegate.hpp create modify commands through command dispatcher 2015-01-15 14:24:33 +01:00
idvalidator.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
idvalidator.hpp fixed error detection and improved error reporting in IdValidator 2014-08-15 13:11:55 +02:00
infocreator.cpp Change default topic info values 2017-08-24 13:51:53 -04:00
infocreator.hpp InfoCreator accepts drops of Topic/Journal ID 2015-06-25 11:24:19 +03:00
landcreator.cpp Fix potential segfault, cleanup, get rid of warnings. 2017-09-09 11:48:13 -04:00
landcreator.hpp Tweaks to land loading, land cloning, terrain signals, placeholder land update handling 2017-09-08 00:51:46 -04:00
landtexturecreator.cpp Get rid of some templates, exceptions instead of assert, and other small changes. 2017-09-17 20:29:51 -04:00
landtexturecreator.hpp Cleanup. Also modify ltex index generation. 2017-09-05 19:29:07 -04:00
nestedtable.cpp More shortcuts. 2016-07-27 01:53:21 -04:00
nestedtable.hpp Disable context menu for fixed size sub-tables. Should resolve bug #2932. 2015-10-28 20:30:30 +11:00
pathgridcreator.cpp Editor: Fix labels for creator user inputs 2017-03-26 09:14:32 -04:00
pathgridcreator.hpp Editor: document subclasses without ID checks 2017-03-26 09:05:05 -04:00
previewsubview.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
previewsubview.hpp added new user setting: window/hide-subview (hide subview titlebar if there is only one subview in the window) 2014-10-27 08:57:18 +01:00
recordbuttonbar.cpp second batch of changing over user settings usage to the new system 2015-12-14 17:38:33 +01:00
recordbuttonbar.hpp second batch of changing over user settings usage to the new system 2015-12-14 17:38:33 +01:00
recordstatusdelegate.cpp removed old user settings system 2015-12-15 12:49:55 +01:00
recordstatusdelegate.hpp create modify commands through command dispatcher 2015-01-15 14:24:33 +01:00
referenceablecreator.cpp Fix shadowing warnings 2016-10-16 01:34:54 +09:00
referenceablecreator.hpp fixed referenceable cloning (and as a side-effect enabled showing the type of the refereceable in the clone UI) 2014-09-20 12:48:51 +02:00
referencecreator.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
referencecreator.hpp moved ref num assingment from instance creation to save procedure 2016-03-24 11:12:05 +01:00
regionmap.cpp Replace "sys::default" with ESM::CellId::sDefaultWorldspace 2016-07-02 19:48:11 +02:00
regionmap.hpp Fixed multiple spelling mistakes 2016-12-14 16:39:33 +01:00
regionmapsubview.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
regionmapsubview.hpp added view action to region map 2014-04-13 15:46:31 +02:00
scenesubview.cpp Fix shadowing warnings 2016-10-16 01:34:54 +09:00
scenesubview.hpp first batch of changing over user settings usage to the new system 2015-12-12 14:49:16 +01:00
scriptedit.cpp Make name highlighting more consistent and only for variable names 2017-05-02 17:28:42 +12:00
scriptedit.hpp Make name highlighting more consistent and only for variable names 2017-05-02 17:28:42 +12:00
scripterrortable.cpp improved ScriptErrorTable handling of script errors that don't have line/column associated with them (also avoiding a segfault) 2017-04-26 15:03:30 +02:00
scripterrortable.hpp first batch of changing over user settings usage to the new system 2015-12-12 14:49:16 +01:00
scripthighlighter.cpp Make name highlighting more consistent and only for variable names 2017-05-02 17:28:42 +12:00
scripthighlighter.hpp Add setting so feature can be turned off 2017-04-28 19:57:49 +12:00
scriptsubview.cpp Fix for bug 3248 2016-03-17 22:34:45 +01:00
scriptsubview.hpp second batch of changing over user settings usage to the new system 2015-12-14 17:38:33 +01:00
startscriptcreator.cpp Editor: Fix labels for creator user inputs 2017-03-26 09:14:32 -04:00
startscriptcreator.hpp Editor: Remove overridden configureCreateCommand 2016-05-08 06:09:40 -04:00
subviews.cpp Land creator 2017-09-04 01:06:58 -04:00
subviews.hpp rewrote subview factory system 2012-12-11 13:22:43 +01:00
table.cpp Hide base land textures. 2017-10-02 15:56:22 -04:00
table.hpp Move touch command to creator, to allow customization and not break abstraction 2017-09-03 17:01:16 -04:00
tablebottombox.cpp Move touch command to creator, to allow customization and not break abstraction 2017-09-03 17:01:16 -04:00
tablebottombox.hpp Move touch command to creator, to allow customization and not break abstraction 2017-09-03 17:01:16 -04:00
tableeditidaction.cpp TableEditIdAction: prevent creation of a UniversalId with Type_None 2015-07-04 19:39:53 +03:00
tableeditidaction.hpp Create a separate class for Edit 'ID' action to use in tables' context menus 2015-07-04 18:49:32 +03:00
tablesubview.cpp Move touch command to creator, to allow customization and not break abstraction 2017-09-03 17:01:16 -04:00
tablesubview.hpp third batch of changing over user settings usage to the new system 2015-12-15 10:40:00 +01:00
util.cpp Editor: Do color to int conversion in ColorEditor 2017-07-26 19:56:54 -04:00
util.hpp second batch of changing over user settings usage to the new system 2015-12-14 17:38:33 +01:00
vartypedelegate.cpp safer handling of command macros 2016-03-08 10:48:44 +01:00
vartypedelegate.hpp create modify commands through command dispatcher 2015-01-15 14:24:33 +01:00