1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 11:59:55 +00:00
Commit graph

102 commits

Author SHA1 Message Date
elsid
630e815f66
Forbid to use toNormalized for normalized path 2024-11-18 21:21:33 +01:00
AnyOldName3
7556ab6f90 Make the launcher ignore case in bsa names 2024-10-21 18:07:13 +01:00
elsid
d1ccb4b804
Use normalized path for groundcover 2024-10-13 13:27:23 +02:00
elsid
d8189a5aa1
Use normalized path in SceneManager 2024-09-13 14:21:49 +02:00
elsid
6e97deb3f7
Use normalized path for text key files 2024-07-22 22:01:04 +02:00
elsid
a49de4b9f1
Do not allow to construct NormalizedView from std::string
To avoid implicit conversion via Normalized which creates NormalizedView from a
temporary Normalized. Mark constructors explicit on purpose so there is no
ambiguity on implicit conversion when there is an overloaded function like:

void f(const Normalized&);
void f(NormalizedView);
2024-07-20 23:58:48 +02:00
elsid
71369be796
Log caught exceptions 2024-05-26 02:52:11 +02:00
elsid
e11a5a4352
Use normalized path for SoundManager::playPlaylist 2024-04-19 22:43:20 +02:00
elsid
82931059fd
Make NormalizedView constructor from const char* explicit 2024-04-19 22:42:04 +02:00
elsid
859d765921
Use normalized path for NifFileManager::get 2024-03-11 22:07:37 +01:00
elsid
ffbeb5ab98
Build localization path using VFS::Path::Normalized 2024-03-09 00:21:17 +01:00
elsid
84adb0a148
Make VFS::Path::Normalized constructor from std::string_view explicit 2024-03-09 00:21:16 +01:00
elsid
ec9c829021
Use normalized path for correctSoundPath 2024-02-24 12:42:36 +01:00
elsid
92d57d6e46
Make Normalized constructor from const char* explicit 2024-02-24 12:42:02 +01:00
Alexei Kotov
89d856d03e Merge branch 'use_is_directory_member' into 'master'
Use is_directory member function

See merge request OpenMW/openmw!3897
2024-02-23 12:36:40 +00:00
psi29a
518f34c869 Merge branch 'bsa_archive' into 'master'
Cleanup and optimize BSA archives code

See merge request OpenMW/openmw!3876
2024-02-22 08:02:12 +00:00
elsid
c2ac1ce046
Use is_directory member function
To reduce the number of syscalls.
2024-02-21 22:03:15 +01:00
elsid
e2e1d913af
Remove redundant destructor 2024-02-18 14:54:51 +01:00
elsid
cc9f9b53ba
Convert BsaVersion to enum class 2024-02-18 14:54:51 +01:00
elsid
df077a2524
Simplify and reduce code duplication for BSA archive creation 2024-02-18 14:54:14 +01:00
elsid
1b1ed55762
Add context to the errors on recursive iteration over directory
To avoid showing users errors like:
recursive_directory_iterator::operator++: Access is denied.

And show something like this:
Failed to recursively iterate over "/home/elsid/.local/share/openmw/test_data"
when incrementing to the next item from
"/home/elsid/.local/share/openmw/test_data/permission_denied": Permission denied
2024-02-18 01:08:19 +01:00
elsid
a2345194c8
Optimize lookup for a file in the BSA archive
Use binary search in sorted vector or normalized paths instead of linear search
in the original file struct. With number of files from 1k to 10k in vanilla
archives this gives some benefits.
2024-02-18 00:56:50 +01:00
elsid
d147d1d250
Initialize FileSystemArchive index in constructor
It should be initialize for each created archive anyway. There is no good reason
to have additional complexity for lazy initialization. And it helps to catch
problems with specific directory when it's added to the VFS not when all are
added and index is built.
2024-02-17 02:07:50 +01:00
elsid
a6657c18cc
Use normalized path for file archives indices 2024-02-08 11:48:59 +01:00
elsid
062d3e9c00
Add NormalizedView for normalized paths 2024-02-08 11:48:57 +01:00
elsid
1689c59546
Add tests for VFS::Path::Normalized 2024-02-08 11:42:28 +01:00
elsid
70061329a1
Return Path::Normalized from RecursiveDirectoryIterator 2024-01-24 22:19:03 +01:00
elsid
9279138fb0
Accept normalized path by VFS::Manager functions 2024-01-24 21:52:49 +01:00
elsid
d549cfd66b
Check path for being normalized 2024-01-24 21:52:49 +01:00
elsid
35d9b18b4c
Add type for normalized VFS path and use for VFS::Manager file map key
This will reduce the number of path normalizations while more places will use
this type. In some cases it also will reduce number of temporary allocations for
new strings.

For now make conversion from and to std::string_view implicit to allow gradual
migration to this type.
2024-01-18 00:03:06 +01:00
elsid
a2147d70cc
Use forward declaration for some VFS types
This will allow to save on preprocessed code size in the future changes.
2024-01-16 01:32:11 +01:00
elsid
0d8dc5aabc
Use string_view for VFS lookups 2023-12-25 12:21:01 +01:00
elsid
3363616f56
Remove redundant startsWith function 2023-12-25 11:43:02 +01:00
Evil Eye
f5a20d1e9c Change include guard name 2023-06-08 21:10:12 +02:00
Evil Eye
e8ddccaefe Use std::transform 2023-06-08 21:10:12 +02:00
Evil Eye
e791d2b498 Fix unit tests 2023-06-08 21:10:11 +02:00
Evil Eye
eeda48ec50 Drop support for --fs-strict 2023-06-08 21:10:09 +02:00
Elias Howell
bf8fafa79a fixed some typos and spelling errors 2023-05-09 20:07:08 -04:00
Cédric Mocquillon
d30deef4b5 Use the right archive type to load bsa according to their type 2023-03-02 21:07:54 +01:00
Cédric Mocquillon
c1fbe90953 Handle GNRL case of ba2 format 2023-03-02 18:19:58 +01:00
jvoisin
3cbf1dc042 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Project579
2df8bfed25 Fix build errors after rebase against master due to large amount of changes. 2022-09-11 14:41:20 +02:00
Project579
a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2022-09-11 14:41:20 +02:00
Project579
e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2022-09-11 14:41:15 +02:00
Project579
4bb07282c9 Replace all remaining occurrences of boost::filesystem with std::filesystem. 2022-09-11 02:19:00 +02:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
psi29a
b032a643f9 Merge branch 'vfs_string_view' into 'master'
Use std::string_view in VFS::Manager

See merge request OpenMW/openmw!2148
2022-07-17 15:50:29 +00:00
Petr Mikheev
38ee6d285d Use std::string_view in VFS::Manager 2022-07-17 12:19:19 +02:00
elsid
6c8ed4d19c
Move Files::IStreamPtr alias to a separate header
To avoid transitive include of Windows.h all over the engine.
2022-07-17 11:35:39 +02:00