Commit Graph

44 Commits (8cf431aeb2b80907e25d941ee6078da0236720e7)

Author SHA1 Message Date
elsid 1857d8a68c
Use target_compile_options to add --coverage 2 years ago
elsid cc066efa11
Fix identation in CMakeLists.txt 2 years ago
Cédric Mocquillon d30deef4b5 Use the right archive type to load bsa according to their type 2 years ago
Cédric Mocquillon 974799c011 Handle DX10 case of ba2 format 2 years ago
Cédric Mocquillon c1fbe90953 Handle GNRL case of ba2 format 2 years ago
elsid d20b05c7fb
Support reading specific nif files from archive by niftest 2 years ago
elsid 2c43a8558a
Add option to disable debug log for unsupported nif files
It becomes quite extensive and not very useful when loading oblivion content
files.
2 years ago
elsid ac5f22445e
Support compressed BSA archives by niftest 2 years ago
elsid 1a2c56fefb
Fix checking for file extension in niftest 2 years ago
jvoisin cd29c181cf Another pass with IWYU 2 years ago
elsid f2fb3d6de8
Separate NIFFileReader from NIFFile
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 4698a4cd2d
Use raw string literals to format command usage messages 2 years ago
elsid 6ae15f08e0
Avoid chained operator() calls to prevent formatting issues 2 years ago
Project579 4e428dee12 Update some settings that accept paths by "std::string" to accept them as "std::filesystem::path" instead. 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 6bf4c7a04f Upgraded "input-file" command line option to Files::MaybeQuotedPath from std::string to allow unicode characters on Windows. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
elsid 9398e97600
Avoid manual memory management for VFS archives 2 years ago
elsid 7e6c13630a Use target_precompile_headers for the most expensive headers 3 years ago
jvoisin 34ae6e8221 Remove dependency on boost::filesystem in bsatool and niftest CMakeLists.txt 3 years ago
jvoisin 472af7c164 Remove boost::filesystem from niftest 3 years ago
elsid 5eb8c4aebe
Avoid redundant conversion to const char* and use make_shared 3 years ago
Bret Curtis 74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
3 years ago
Evil Eye 751e8cf76b Do a bounds check before calling functions defined in cctype 3 years ago
Cédric Mocquillon d4e26746a3 Use recurse subdirectory iterator to iterate over the VFS without exposing internal details 3 years ago
Thunderforge ded7bd92e6 Using auto keyword in most apps
Detected by clang-tidy's modernize-use-auto
4 years ago
Thunderforge 339d347aea Fixing performance-faster-string-find issues
This addresses the Clang Tidy check [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html).
4 years ago
Alexei Dobrohotov c857588ee9 Remove NIFFile settings manager dependency 4 years ago
Andrei Kortunov fd5e9cf271 Catch possible boost::bad_any_cast exception 6 years ago
Andrei Kortunov 68c170f065 Refactor tools to do not use boost exceptions and exit() command 6 years ago
Andrei Kortunov f20d1b1b72 Catch exception in the NIFTest 6 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
AnyOldName3 8c74f16247 Restore trailing new lines to shrink PR 7 years ago
AnyOldName3 5ce34f1cbf Move new behaviour into macro to reduce code duplication 7 years ago
AnyOldName3 3c0ec0d6d0 If CMake supports it, sets the debugger working directory for Visual Studio 7 years ago
Arthur Moore 20078c41c3 Removed now unneeded script 10 years ago
Arthur Moore c7b97ee9ba Cleaned up niftest's output
A bad file inside of a bsa archive now looks like:
<game dir>/Data Files/TR_Data.bsa/meshes/tr/x/tr_act_ind_mark_alm.nif
10 years ago
Arthur Moore 3d78ee0c2b niftest now scans BSA files in directories for nif errors
The program is explicit so the user knows exactly where the bad file is.
10 years ago
Arthur Moore 6a6da42b85 Updated niftest's help message 10 years ago
Arthur Moore efadce3e90 Have niftest handle directories as well
Note:  BSA files within the directory must be passed manually.
10 years ago
Arthur Moore 865491d101 Added a help message to niftest
Now using the boost argument parser.
10 years ago
Arthur Moore 2a653e45fd (Re) Wrote a tool to test NIF files in BSAs and on the filesystem.
Just give it a set of files, one file per argument, and it will make sure openmw can read them.
10 years ago