Commit Graph

15 Commits (8cf431aeb2b80907e25d941ee6078da0236720e7)

Author SHA1 Message Date
Andrei Kortunov 302c331559 Add field initialization 2 years ago
elsid 2fcb94064d
Support RefId comparison with std::string_view 2 years ago
florent.teppe 65cdd489fb create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types

removed useless header

applied clang format

fixed compile tests

fixed clang tidy, and closer to logic before this MR

Removed hardcoded refids

unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string

Fix clang format

Fixed a few instances where std::string was used, when only const std::string& was needed

removed unused variable
2 years ago
fteppe 20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

OpenCS compiles and runs! Didn't have time to test it all though

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 b82176410b Use std::filesystem for unit tests temporary files path. 2 years ago
elsid 3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
3 years ago
elsid 194c11f214
Fix loading order in EsmLoader
Need to load the last present record from a sequence of loaded records. That
means reverse should be called before unique or unique should be applied for
a reversed range. Since unique keeps only the first element from a sub
sequence of equal elements.

Use forEachUnique with reversed range to avoid redundant container
modifications.
3 years ago
Bret Curtis 022fdc49a5 update tests to use esm3 rename 3 years ago
elsid 4b59ff2060
Include headers instead of source files 3 years ago
elsid da0c5b54f0
Load only supported content formats by EsmLoader 3 years ago
psi29a 1ffa02b2fd Merge branch 'fix_windows_tests' into 'master'
Fix tests on windows

See merge request OpenMW/openmw!1313
3 years ago
elsid b5f0057ac9
Fix tests on windows 3 years ago
elsid a3b6bc7263
Fix logic expression for not found value 3 years ago
elsid 046b5f83ee
Add ESM data loader
A component to load ESM content files with limited support for record types and
selection which of them to load. Supported record types are:
ACTI, CELL, CONT, DOOR, GMST, LAND, STAT.
3 years ago