1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:49:55 +00:00
openmw-tes3mp/apps/openmw/mwgui
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
..
alchemywindow.cpp Include cleanup 2017-09-27 12:56:09 +00:00
alchemywindow.hpp Include cleanup 2017-09-27 12:56:09 +00:00
backgroundimage.cpp Remove name extension for internal MyGUI textures 2015-05-15 23:21:29 +02:00
backgroundimage.hpp Add option to stretch menu backgrounds/cutscenes to the whole screen 2015-01-28 00:22:56 +01:00
birth.cpp Set default values for class and birthsign select menus (bug #4226) 2017-11-25 11:35:29 +04:00
birth.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
bookpage.cpp Fix memory leak 2018-03-13 21:32:59 +03:00
bookpage.hpp improve dialogue window performance 2017-07-26 18:58:27 +02:00
bookwindow.cpp Prevent overlapping for journal and books scrolling 2018-03-11 16:19:37 +04:00
bookwindow.hpp Improve keyboard navigation of book/scroll windows 2017-09-25 00:47:04 +02:00
charactercreation.cpp Fix shadowing warnings 2017-04-21 11:06:18 +09:00
charactercreation.hpp Show starting abilities, powers and spells in stat-review window (Fixes #2410) 2016-11-19 21:51:19 +01:00
class.cpp Set default values for class and birthsign select menus (bug #4226) 2017-11-25 11:35:29 +04:00
class.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
companionitemmodel.cpp Include cleanup 2015-07-18 20:36:28 +02:00
companionitemmodel.hpp Remove NpcStats::mProfit and store it in the script instead 2015-01-31 22:40:40 +01:00
companionwindow.cpp Round up displayed encumbrance 2018-02-24 15:13:14 +03:00
companionwindow.hpp Include cleanup 2017-09-27 12:56:09 +00:00
confirmationdialog.cpp Remove unused and slightly broken custom button titles in ConfirmationDialog 2017-09-24 19:08:14 +02:00
confirmationdialog.hpp Remove unused and slightly broken custom button titles in ConfirmationDialog 2017-09-24 19:08:14 +02:00
console.cpp Fix console selected object persisting on a new game 2017-09-30 15:40:47 +00:00
console.hpp Fix console selected object persisting on a new game 2017-09-30 15:40:47 +00:00
container.cpp Fixes crash on quickload from the container menu (bug #4239) 2017-12-03 21:49:13 +04:00
container.hpp Move onClose() check to item models 2017-11-10 10:58:43 +04:00
containeritemmodel.cpp Merge pull request #1549 from akortunov/itemmodels 2017-11-11 22:12:07 +00:00
containeritemmodel.hpp Move onClose() check to item models 2017-11-10 10:58:43 +04:00
controllers.cpp fixing MSVC 2013 warning C4244: & C4305 2015-03-08 13:07:29 +13:00
controllers.hpp Reduce MyGUI includes 2015-01-10 02:50:43 +01:00
countdialog.cpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
countdialog.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
cursor.cpp OpenMW compiles and runs w/o render window 2015-04-01 17:02:15 +02:00
cursor.hpp Remove software cursor option, hw cursors seem to be working well enough 2013-11-20 06:20:16 +01:00
debugwindow.cpp Fix build against bullet with profiler disabled (Fixes #3592) 2016-10-14 21:00:35 +02:00
debugwindow.hpp Add debug window (F10), displays Bullet's profiler output 2014-09-28 18:02:49 +02:00
dialogue.cpp Update dialogue topics list after result script is run 2017-11-15 17:20:06 +00:00
dialogue.hpp Update dialogue topics list after result script is run 2017-11-15 17:20:06 +00:00
draganddrop.cpp Exit drag-and-drop if dragged item is deleted (Fixes #3097) 2017-09-26 16:51:19 +02:00
draganddrop.hpp Exit drag-and-drop if dragged item is deleted (Fixes #3097) 2017-09-26 16:51:19 +02:00
enchantingdialog.cpp Fix dialogue window not being exited properly 2017-09-27 12:56:02 +00:00
enchantingdialog.hpp Make Enter on a name edit accept the dialog 2017-09-25 00:47:07 +02:00
exposedwindow.cpp Fix headers including whole MyGUI.h, forward declare where appropriate, and fix some deprecated types (WidgetPtr) 2013-03-03 13:11:02 +01:00
exposedwindow.hpp Fix headers including whole MyGUI.h, forward declare where appropriate, and fix some deprecated types (WidgetPtr) 2013-03-03 13:11:02 +01:00
formatting.cpp Improve keyboard navigation of book/scroll windows 2017-09-25 00:47:04 +02:00
formatting.hpp Reduce MyGUI includes 2015-01-10 02:50:43 +01:00
hud.cpp Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
hud.hpp Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
inventoryitemmodel.cpp Move onClose() check to item models 2017-11-10 10:58:43 +04:00
inventoryitemmodel.hpp Move onClose() check to item models 2017-11-10 10:58:43 +04:00
inventorywindow.cpp Reset an inventory filter after reload or a new game start (bug #4392) 2018-04-13 09:19:49 +04:00
inventorywindow.hpp OnActivate is triggered when the item is picked up 2017-10-31 22:33:26 +00:00
itemchargeview.cpp Explicitely set the user data type to avoid const/non-const mismatch 2017-03-13 02:48:23 +01:00
itemchargeview.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
itemmodel.cpp remove redundant allowedToInsertItems() function from ItemModel 2017-11-11 11:58:22 +04:00
itemmodel.hpp remove redundant allowedToInsertItems() function from ItemModel 2017-11-11 11:58:22 +04:00
itemselection.cpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
itemselection.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
itemview.cpp Don't reset the item model's sort/filter options in updatePlayer (Fixes #2863) 2015-08-16 17:49:53 +02:00
itemview.hpp Merge branch 'master' of https://github.com/OpenMW/openmw into osg 2015-06-07 15:23:54 +02:00
itemwidget.cpp Don't use floating point arithmetics for formatted count (Bug #4346) 2018-03-07 15:36:10 +03:00
itemwidget.hpp ItemWidget: skip setImageTexture if the icon has not changed 2017-02-05 02:26:27 +01:00
jailscreen.cpp Fix jail screen fading 2017-10-14 14:03:16 +00:00
jailscreen.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
journalbooks.cpp Do not display cyrillic soft/hard signs in the journal index 2017-12-04 22:42:17 +04:00
journalbooks.hpp Remove getEncoding() from WindowManager 2017-11-22 08:32:38 +04:00
journalviewmodel.cpp Move toUpper() from StringUtils to the JournalViewModel 2017-11-23 19:37:45 +04:00
journalviewmodel.hpp Convert topic name to Unicode 2017-11-21 12:31:23 +04:00
journalwindow.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
journalwindow.hpp Remove getEncoding() from WindowManager 2017-11-22 08:32:38 +04:00
keyboardnavigation.cpp Add an option to disable GUI keyboard navigation (Bug #4333) 2018-03-08 23:39:35 +00:00
keyboardnavigation.hpp Add an option to disable GUI keyboard navigation (Bug #4333) 2018-03-08 23:39:35 +00:00
layout.cpp Move OEngine::Gui::Layout to MWGui 2015-05-01 02:22:51 +02:00
layout.hpp Move OEngine::Gui::Layout to MWGui 2015-05-01 02:22:51 +02:00
levelupdialog.cpp Fix wrong skin for levelup attribute values 2017-09-27 22:04:36 +02:00
levelupdialog.hpp Rename WindowBase's open/close to onOpen/onClose 2017-09-24 19:08:12 +02:00
loadingscreen.cpp Make the CompositeMapRenderer use available time and add related setting 2018-02-13 00:40:41 +00:00
loadingscreen.hpp Fade screen out during loading screen (when travelling) 2017-10-04 16:00:38 +00:00
mainmenu.cpp Fix exiting savegamedialog with 'esc' when no game is running 2017-10-05 18:35:09 +02:00
mainmenu.hpp Fix exiting savegamedialog with 'esc' when no game is running 2017-10-05 18:35:09 +02:00
mapwindow.cpp Remove unused and slightly broken custom button titles in ConfirmationDialog 2017-09-24 19:08:14 +02:00
mapwindow.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
merchantrepair.cpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
merchantrepair.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
messagebox.cpp Workaround to make sure message box remains on top (Fixes #4298) 2018-01-14 00:27:53 +00:00
messagebox.hpp Workaround to make sure message box remains on top (Fixes #4298) 2018-01-14 00:27:53 +00:00
mode.hpp Remove redundant RestBed gui mode 2017-09-24 19:08:14 +02:00
pickpocketitemmodel.cpp remove redundant allowedToInsertItems() function from ItemModel 2017-11-11 11:58:22 +04:00
pickpocketitemmodel.hpp remove redundant allowedToInsertItems() function from ItemModel 2017-11-11 11:58:22 +04:00
quickkeysmenu.cpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
quickkeysmenu.hpp Call onResChange for every window 2017-09-24 19:08:15 +02:00
race.cpp Fix crash due to not calling WindowModal::onClose() 2017-09-25 00:47:08 +02:00
race.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
recharge.cpp Include cleanup 2017-09-27 12:56:09 +00:00
recharge.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
referenceinterface.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
referenceinterface.hpp Remove redundant player cell variable 2017-09-24 19:08:13 +02:00
repair.cpp Include cleanup 2017-09-27 12:56:09 +00:00
repair.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
review.cpp Rename WindowBase's open/close to onOpen/onClose 2017-09-24 19:08:12 +02:00
review.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
savegamedialog.cpp Fix unused event handler 2017-10-15 17:06:58 +02:00
savegamedialog.hpp Update the saves list/preview image when character selection changes to make it more convenient to flip through characters with the keyboard 2017-10-04 16:00:39 +00:00
screenfader.cpp Use MyGUI frame events for ScreenFader 2017-10-04 16:00:38 +00:00
screenfader.hpp Use MyGUI frame events for ScreenFader 2017-10-04 16:00:38 +00:00
scrollwindow.cpp Improve keyboard navigation of book/scroll windows 2017-09-25 00:47:04 +02:00
scrollwindow.hpp Improve keyboard navigation of book/scroll windows 2017-09-25 00:47:04 +02:00
settingswindow.cpp Use first resolution in fullscreen if current is not supported (Fixes #4113) 2017-09-29 14:58:25 +00:00
settingswindow.hpp Call onResChange for every window 2017-09-24 19:08:15 +02:00
sortfilteritemmodel.cpp Remove missing souls, remove some runaway exceptions (Fixes #4111) 2018-03-08 23:38:04 +00:00
sortfilteritemmodel.hpp Move onClose() check to item models 2017-11-10 10:58:43 +04:00
soulgemdialog.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
soulgemdialog.hpp Added soulgem dialog; made interactive message boxes not close the previous UI 2013-03-30 15:51:07 +01:00
spellbuyingwindow.cpp Fix dialogue window not being exited properly 2017-09-27 12:56:02 +00:00
spellbuyingwindow.hpp Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
spellcreationdialog.cpp Make Enter on a name edit accept the dialog 2017-09-25 00:47:07 +02:00
spellcreationdialog.hpp Make Enter on a name edit accept the dialog 2017-09-25 00:47:07 +02:00
spellicons.cpp durations in tooltips : use "show effect duration" setting 2015-09-16 22:42:54 +02:00
spellicons.hpp Silence -Wreorder warnings. 2015-04-28 18:48:02 -05:00
spellmodel.cpp Added checkMagicka parameter 2017-11-28 23:35:54 +01:00
spellmodel.hpp Silence -Wreorder warnings. 2015-04-28 18:48:02 -05:00
spellview.cpp Adjust some more windows to be keyboard friendlier 2017-09-24 19:08:14 +02:00
spellview.hpp remove boost/tuple 2017-06-09 19:08:53 +02:00
spellwindow.cpp Call WindowBase::onFrame() for every active window 2017-09-24 19:08:15 +02:00
spellwindow.hpp Rename WindowBase's open/close to onOpen/onClose 2017-09-24 19:08:12 +02:00
statswindow.cpp Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
statswindow.hpp Rename WindowBase's open/close to onOpen/onClose 2017-09-24 19:08:12 +02:00
textcolours.hpp improve dialogue window performance 2017-07-26 18:58:27 +02:00
textinput.cpp Rename WindowBase's open/close to onOpen/onClose 2017-09-24 19:08:12 +02:00
textinput.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
timeadvancer.cpp Add training progress bar, implement jail screen, tweak wait dialog (Fixes #1714) 2015-02-07 04:05:28 +01:00
timeadvancer.hpp Add training progress bar, implement jail screen, tweak wait dialog (Fixes #1714) 2015-02-07 04:05:28 +01:00
tooltips.cpp Fix owned tooltip in the spellwindow 2017-10-06 11:38:27 +04:00
tooltips.hpp Use owned tooltips for items in containers correctly 2017-10-04 12:13:45 +04:00
tradeitemmodel.cpp Use owned tooltips for items in containers correctly 2017-10-04 12:13:45 +04:00
tradeitemmodel.hpp Use owned tooltips for items in containers correctly 2017-10-04 12:13:45 +04:00
tradewindow.cpp Fix dialogue window not being exited properly 2017-09-27 12:56:02 +00:00
tradewindow.hpp Make TradeWindow not depend on DialogueWindow 2017-09-25 18:07:49 +02:00
trainingwindow.cpp Allow training window exit() 2017-10-08 20:38:20 +00:00
trainingwindow.hpp Allow training window exit() 2017-10-08 20:38:20 +00:00
travelwindow.cpp Option to charge for all companions travelling (fixes #4064) 2018-04-09 19:19:50 +03:00
travelwindow.hpp Refactor exitCurrentGuiMode 2017-09-24 19:08:13 +02:00
videowidget.cpp Change the way that image origin is converted to OpenGL's lower-left convention 2016-02-05 21:03:11 +01:00
videowidget.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
waitdialog.cpp Add missing WaitDialog::clear() (Fixes #4196) 2017-11-08 00:24:04 +00:00
waitdialog.hpp Add missing WaitDialog::clear() (Fixes #4196) 2017-11-08 00:24:04 +00:00
widgets.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
widgets.hpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
windowbase.cpp Some PVS-Studio and cppcheck fixes 2018-04-18 12:36:10 +00:00
windowbase.hpp Improve KeyboardNavigation to better handle modal windows 2017-09-27 12:55:58 +00:00
windowmanagerimp.cpp Merge pull request #1628 2018-03-16 23:25:29 +00:00
windowmanagerimp.hpp Prevent overlapping for journal and books scrolling 2018-03-11 16:19:37 +04:00
windowpinnablebase.cpp Use mouse pressed event for pin button instead of mouse click 2015-01-31 22:40:41 +01:00
windowpinnablebase.hpp Use mouse pressed event for pin button instead of mouse click 2015-01-31 22:40:41 +01:00