Commit Graph

168 Commits (0873eb6e62c4190017c3a6411bb61f5293e7e4f1)

Author SHA1 Message Date
AnyOldName3 ff3ffa13b6 Auto format 10 months ago
AnyOldName3 28131fd62b Fixes for a whole bunch of warnings
These warnings were always enabled, but we didn't see them due to https://gitlab.com/OpenMW/openmw/-/issues/7882.
I do not fully understand the cause of 7822 as I can't repro it in a minimal CMake project.

Some of these fixes are thought through.
Some are sensible best guesses.
Some are kind of a stab in the dark as I don't know whether there was a
possible bug the warning was telling me about that I've done nothing to
help by introducing a static_cast.

Nearly all of these warnings were about some kind of narrowing
conversion, so I'm not sure why they weren't firing with GCC and Clang,
which have -Wall -Wextra -pedantic set, which should imply -Wnarrowing,
and they can't have been affected by 7882.

There were also some warnings being triggered from Boost code.
The vast majority of library headers that do questionable things weren't
firing warnings off, but for some reason, /external:I wasn't putting
these Boost headers into external mode.

We need these warnings dealt with one way or another so we can switch
the default Windows CI from MSBuild (which doesn't do ccache) to Ninja
(which does).
I have the necessary magic for that on a branch, but the branch won't
build because of these warnings.
10 months ago
elsid 8c6e0866e0
Avoid seek for detecting BSA type
Seek is pretty expensive operation. Try to read first 12 bytes instead.
11 months ago
elsid cc9f9b53ba
Convert BsaVersion to enum class 11 months ago
Alexei Kotov 84ab7afd44 Make BA2 extension hash calculation safer (#7784) 12 months ago
Andrei Kortunov 87c9f395f1 Move local variables in components 12 months ago
psi29a 64bdbe339d
Merge branch 'starfieldbsa' into 'master'
Support Starfield BA2s

See merge request OpenMW/openmw!3392
1 year ago
Alexei Kotov b2bb19ae4d Support Starfield BA2s 1 year ago
Alexei Kotov 4d717ade6c Allow BSA string tables to contain padding 1 year ago
psi29a 7233277d27 Merge branch 'compressedbsagozoomzoom' into 'master'
Rewrite compressed BSA loading

See merge request OpenMW/openmw!3361
1 year ago
Alexei Kotov ab4ed390fc Rewrite compressed BSA loading 1 year ago
Cédric Mocquillon 3b1d6a7e62 Use the right size 1 year ago
Alexei Kotov 353b06325e Fix unintended sign extension in compressed BSA hash generation
Which, however, never happens with non-ASCII characters
1 year ago
elsid b8525e8e3d
Fix code format 2 years ago
fall-leaf cc7e29c9a2 opensuse build fix 2 years ago
Cédric Mocquillon 19fbba080d Add a check if the requested file is not found 2 years ago
Cédric Mocquillon 7f936ad18f Some cleanup on includes 2 years ago
Cédric Mocquillon 64ce6eb6bc Merge the two identical conditions 2 years ago
Cédric Mocquillon 1a7b2cd611 Fix remaining bugs 2 years ago
Cédric Mocquillon d2244c8d97 Fix detectVersion 2 years ago
Cédric Mocquillon 78251a2bb1 Move outside the condition + fix bug: missing offset 2 years ago
Cédric Mocquillon d73ab7ef6f Add comments 2 years ago
Cédric Mocquillon 24272d07bf Share generateHash used in ba2dx10file and ba2gnrlfile 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
jvoisin 3cbf1dc042 First pass with include-what-you-use 2 years ago
elsid 063fff7fa4
Fix and prevent -Wextra-semi warning 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 9ceafe770d Hard fail on loading BSA with records using unicode paths. 2 years ago
Project579 2df8bfed25 Fix build errors after rebase against master due to large amount of changes. 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
AnyOldName3 4e8e2e1c60 Eliminate &thing[0] pattern 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 6c8ed4d19c
Move Files::IStreamPtr alias to a separate header
To avoid transitive include of Windows.h all over the engine.
2 years ago
elsid bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
3 years ago
florent.teppe 4f832f479b Fixes compressed BSA loading
When creating the folders map, the folder name without / is hashed, but when trying to get a file record, when looking for a folder it was hashed wit the /
So now in getFileRecord parent_path is used instead
3 years ago
jvoisin aeb3733e57 Remove boost:: constructs
Namely boost::scoped_array and boost::to_lower_copy.
3 years ago
jvoisin 6feb92a9bf Remove boost::filesystem from a couple of files 3 years ago
elsid 94c1d0cced
Use unique_ptr to store istream 3 years ago
elsid 5eb8c4aebe
Avoid redundant conversion to const char* and use make_shared 3 years ago
Cédric Mocquillon ff7ad93bac Avoid missusing of CompressedBSAFile with private inheritance 3 years ago
Cédric Mocquillon fe13fa850e Fix bug on memorystream 3 years ago
Cédric Mocquillon eb75e394b3 Use Files::MemBuf for Bsa::MemoryInputStream base classe instead of making a duplicate (MemoryInputStreamBuf) 3 years ago
Bo Svensson db3d938ee9
cleans up BSAFile (#3177)
We currently build a large map of a BSAFile's contents unused by Open MW. We already map archive contents in VFS. With this PR we remove the map from BSAFile and reimplement its only current use in BSATool.
3 years ago
Bo Svensson 7c50f823d8
devirtualises BSAFile (#3161)
Currently, Open MW's basic file access speed is limited by a peculiar layer of virtualisation in BSAFile's interface. This PR removes such virtualisation by properly separating BSAFile from CompressedBSAFile in low level contexts.
3 years ago
Evil Eye 0998929608 Merge branch 'noreturn' into 'master'
Sprinkle some [[noreturn]] where possible

See merge request OpenMW/openmw!793
4 years ago
jvoisin 1123dc46ee Add a ton of const refs 4 years ago
jvoisin aec3c74fa5 Sprinkle some [[noreturn]] where possible 4 years ago
CedricMocquillon 86d137363e Check if the archive is opened before adding a file to it and clear state on close 4 years ago