Commit Graph

56 Commits (520e65f82205480a6286d6c51129c0715ec13149)

Author SHA1 Message Date
tri4ng1e d310d36ea3
[Fix] Some PVS-Studio and cppcheck fixes 7 years ago
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
Rohit Nirmal 997347b01e Silence -Wreorder warnings. 10 years ago
scrawl eecea4131f Reduce MyGUI includes 10 years ago
Alexander "Ace" Olofsson 0af5c7b379 Starting to clean up some heavy includes 10 years ago
scrawl 7252cb63a6 Fix cppcheck issues 10 years ago
scrawl f82224497a Compatibility fix for MyGUI git 10 years ago
scrawl cfc57d0fe0 Use MyGUI's castType for widget casts 10 years ago
scrawl c6bcd75058 Add various custom widgets used in OpenMW to the MyGUI plugin 10 years ago
MiroslavR a9f7a30d90 HBox, VBox: call parent setPropertyOverride 11 years ago
scrawl 32ff3b530c Change all instances of skill/attribute values to use an appropriate typedef. 11 years ago
scrawl 58fce74620 Use the already existing mScrollPage as step size for scrollbar button repeats; increased precision of options menu sliders 12 years ago
Sebastian Wick 26bd2a5301 use the new scrollbar; range dependent step size; fix 12 years ago
Sebastian Wick b43f41c2bd use a mygui controller for scrollbar repeat 12 years ago
Sebastian Wick e3d8bdbafe autorepeat scrollbar 12 years ago
Britt Mathis 6128b9276f Removed non-essential includes from all MWGui header files. 12 years ago
Britt Mathis f7383905b7 Finally eliminated calls to MWBase::WindowManager in constructors 12 years ago
Britt Mathis ce9bc6d9ba MwGui windowManager calls fixed to use MWBase::Environment::get().getWindowManager, filenames in MwGui now comply with naming conventions 12 years ago
scrawl c4a42f2e1f Fix infinite recursion on shutdown caused by incorrect onWidgetDestroy listener 12 years ago
scrawl 4c588cbab6 Levelup dialog is now dynamic; added level descriptions 12 years ago
scrawl 9a84f6744f Fix headers including whole MyGUI.h, forward declare where appropriate, and fix some deprecated types (WidgetPtr) 12 years ago
scrawl c71656493d Ingredient effects now correctly hide until the player has discovered them 12 years ago
greye 2057f5619e move ESMStore to MWWorld 12 years ago
scrawl f154031e54 last bits of the gui 12 years ago
scrawl 21493c2dbd added magic effect flags from Research wiki page 12 years ago
scrawl b63d205c6e change the select attribute/skill dialogs to be reusable 12 years ago
scrawl 9d7c35ae48 and go 12 years ago
scrawl 0ba996f290 dialog layout 12 years ago
scrawl bc6a1979b0 replaced everything with the new method 12 years ago
scrawl b66c8099eb new system for dynamic sizing of buttons & text boxes 12 years ago
scrawl 35dd49f948 fixed some "using namespace" in headers 12 years ago
Marc Zinnschlag 6534c2a55a Issue #107: WindowManager is accessed only through the interface class from now on 13 years ago
Carl Maxwell e4d046f69c Prepending m to the name of every member variable.
I made a bunch of changes in apps/openmw/mwrender/animation.cpp
because the scope brackets didn't line up in a bunch of places
    npcanimations.cpp & creatureanimations.cpp were the same kind of
thing
13 years ago
scrawl c85c794c86 fixed some cppcheck issues 13 years ago
scrawl 1ecc6f97ed alchemy effect fix 13 years ago
scrawl 1df1b521a4 show the list of potion effects 13 years ago
scrawl a3a22e9096 ingredient tooltip shows possible effects 13 years ago
scrawl a1907e7b88 cleaning up mwgui/widgets part 1 13 years ago
scrawl ea275a8aa8 extended the list of spells with no magnitude / no duration 13 years ago
scrawl 2f0a69160c small fix 13 years ago
scrawl 22f524f8d5 potion effects in tooltip 13 years ago
scrawl b82c39c8be renamed Widgets::MWEnchantment to Widgets::MWEffectList so it can be
reused for potion effects
13 years ago
scrawl f733382f74 tooltip now contains info about item enchantment 13 years ago
scrawl 4889902b98 magic effect widget improvements, read name of effect from GMST and don't show duration/target for constant effects 13 years ago
scrawl c7381d4491 adding widget MWEnchantment 13 years ago
Alexander "Ace" Olofsson 55f1053b4f Windows fixes for compiling and linking 13 years ago
scrawl 64212c0ee6 replaced all the StaticImage and StaticText in code 13 years ago
scrawl deeb21a131 switched to the new multi-delegates system 13 years ago
scrawl d451d7bb67 compile fixes for mygui 3.2 13 years ago
Jan-Peter Nilsson 54fc64cb6a Decrease number of classes that need to know about other components 14 years ago