Commit Graph

92 Commits (ffi-server-rewrite)

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
scrawl 87311d86b5 Fix what looks like a copy/paste error 7 years ago
Andrei Kortunov 73d5efabee Display negative values on fatigue progress bar 7 years ago
scrawl a47617c21f Fix tab indentations in apps/ and components/ 9 years ago
scrawl 91d71d0fcd Disable MyGUI's scrollbar autorepeat (Fixes #2779)
We are currently using a custom implementation so as to support MyGUI version 3.2.1. When compiled with 3.2.2 or later, we need to disable MyGUI's autorepeat so that it doesn't interfere with ours.
10 years ago
scrawl d4c45efb2b Remove useless #undef's for windows now that we have NOMINMAX flag 10 years ago
scrawl 8e0a988289 Icon fix 10 years ago
scrawl 82c4d01b37 Add back resource handling workarounds to the gui code 10 years ago
scrawl 4e69e7cc0f OpenMW compiles and runs w/o render window 10 years ago
dteviot e197f5318b fixing MSVC 2013 warning C4244: & C4305
conversion from 'const float' to 'int', possible loss of data
conversion from 'double' to 'int', possible loss of data
conversion from 'float' to 'int', possible loss of data
10 years ago
dteviot 45b6538820 fixed MSVC 2013 warning C4800
forcing value to bool 'true' or 'false'
10 years ago
scrawl 728b842e72 Use MyGUI::utility in favor of boost lexical_cast 10 years ago
scrawl eecea4131f Reduce MyGUI includes 10 years ago
Marc Zinnschlag 31f6ccdf4d Merge remote-tracking branch 'internecine/bug2031' 10 years ago
Alexander "Ace" Olofsson 0af5c7b379 Starting to clean up some heavy includes 10 years ago
Internecine 9c5f156793 Fixes tooltip displaying 0 durations 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 5977860e09 Fix broken coin placement in levelup dialog + possible memleak 10 years ago
MiroslavR 41c6045986 Realign all parent boxes when autosizedwidgets change size 10 years ago
MiroslavR 195f044f3b Replace more .tga->.dds hacks with ResourceHelpers 11 years ago
MiroslavR a9f7a30d90 HBox, VBox: call parent setPropertyOverride 11 years ago
scrawl 082b6125a9 Fix crash during spell creation when an effect targeting a skill/attribute doesn't have one assigned yet (Fixes #1598) 11 years ago
scrawl d4678a8d55 Fix level up dialogue layout (Fixes #1393) 11 years ago
scrawl b42240be6d Implement Damage/restore skill/attribute effects. Use dedicated classes for skill and attribute values (instead of Stat<T>) since there are some important differences. 11 years ago
scrawl eba60858dd Closes #1078: Show stat bar text even when 0 11 years ago
scrawl bf5529819d Added combo box widget and use it in options menu. Fixes to VBox / HBox. Added savegame dialog. 11 years ago
Jordan Ayers 6e4978643c Magic Effect descriptions: support feet / level modes.
Show proper suffixes for all magnitudes.
Drop extra 'times' symbol in 'timesInt format (not consistent
with other magnitude displays).
11 years ago
Jordan Ayers 6ab7002908 MagicEffect: Put magnitude type into ESM::MagicEffect helper. 11 years ago
Jordan Ayers 065f435225 Format fix: remove extra spaces from ranged TimesINT formatting. 11 years ago
Jordan Ayers 6303e56ce4 Magic Effect Display cleanup: Don't put spaces in percentages. 11 years ago
Jordan Ayers 707f45aa8e Magic Effect Display improvement.
Related to Bug #794.
Always show one decimal point precision for Fortify Max. Magicka effect.
11 years ago
Jordan Ayers 6983a55a16 Magic effect display improvement.
Related to Bug #794.
Show the "x INT" notation for Fortify Max. Magicka.
Show "%" notation for weakness / resistance effects.
11 years ago
scrawl 7dc30a01cd Some changes suggested by cppcheck 12 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 7eee86ab66 No more using namespace 12 years ago
Britt Mathis 60fadaeaf0 Cleaned up includes in implementation 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 fdcbdbf35d Rewrote layout tooltips to use the new box layout system, fixes word wrapping delay 12 years ago
scrawl 4c588cbab6 Levelup dialog is now dynamic; added level descriptions 12 years ago
Marc Zinnschlag 3e97943e06 Merge remote-tracking branch 'scrawl/includes' 12 years ago
scrawl 9a84f6744f Fix headers including whole MyGUI.h, forward declare where appropriate, and fix some deprecated types (WidgetPtr) 12 years ago