Petr Mikheev
a8acc19988
Avoid copying std::string in MWWorld::Ptr::getTypeDescription()
2021-10-12 00:18:23 +02:00
Evil Eye
d680aa26e9
Disallow switch fallthrough
2021-10-03 21:58:10 +02:00
psi29a
782e0710af
Merge branch 'OpenCS-preserve-blocked' into 'master'
...
OpenCS - Preserve "blocked" record flags when saving. #6288
Closes #6288
See merge request OpenMW/openmw!1052
2021-09-27 19:21:20 +00:00
Evil Eye
831055f878
Merge branch 'OpenCS-fix-modify' into 'master'
...
OpenCS - Re-implement the fix for Issue #6067 .
See merge request OpenMW/openmw!1173
2021-09-19 19:23:30 +00:00
psi29a
18f5762a76
Merge branch 'master' into 'OpenCS-preserve-blocked'
...
# Conflicts:
# CHANGELOG.md
2021-09-18 15:20:26 +00:00
Cédric Mocquillon
d4e26746a3
Use recurse subdirectory iterator to iterate over the VFS without exposing internal details
2021-09-14 18:09:54 +02:00
elsid
6b7434ca69
Pass std::string_view instead of const std::string&
...
* Starting with Actor::getBodyPartMesh and ending with
Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
2021-09-09 18:39:50 +02:00
elsid
a8c16071dc
Fix -Wreturn-local-addr warning
...
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp: In member function ‘const string& CSMWorld::ActorAdapter::ActorData::getPart(ESM::PartReferenceType) const’:
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp:142:20: error: returning reference to temporary [-Werror=return-local-addr]
142 | return "";
| ^~
2021-09-04 18:04:45 +02:00
jvoisin
d4e3575f1d
Don't use const
for objects returned by value.
...
This prevents the usage of std::move semantics,
and makes clang-tidy sad.
2021-09-01 22:23:50 +02:00
cc9cii
0a5571f19e
Disable editing for blocked records in both table and dialogue edit widget.
2021-08-29 15:27:59 +10:00
cc9cii
2eb210f31a
Partially undo commit 71be4cdd20
so that moved references retain the original refnum. This is consistent with vanilla CS's behaviour.
2021-08-28 16:12:40 +10:00
cc9cii
b2bd97f283
A different implementation to MR 1051 to fix Issue #6067 .
...
This MR doesn't delete the original record, but instead the original record is updated with the moved record when loading.
Issue #4752 is no longer addressed in this MR.
2021-08-28 14:09:55 +10:00
cc9cii
7264a10c07
Partially revert commit dab1a9e7fb
2021-08-28 09:49:45 +10:00
cc9cii
7227a83e60
Preserve "blocked" record flags when saving with OpenCS. This will help outputs of OpenCS to be used with vanilla Morrowind.
...
Sample use case: users are using the Morrowind Code Patch feature that allows modders to enable this flag to differentiate editor-made potions from player crafted potions for tooltips.
2021-08-28 09:42:54 +10:00
psi29a
66f028c4a1
Merge branch 'correctcommandimplementation' into 'master'
...
Don't do storage in constructors of the commands
See merge request OpenMW/openmw!1126
2021-08-27 07:30:45 +00:00
psi29a
fff35dcb03
Merge branch 'Ignore-empty-pgrd' into 'master'
...
Do not store empty PGRD records. Should resolve Issue #6209 .
See merge request OpenMW/openmw!1121
2021-08-26 14:29:49 +00:00
unelsson
de3497d291
Fix undo-redo crash
2021-08-22 23:42:27 +03:00
unelsson
890ce1eefb
Reverse action order for redo and undo
2021-08-22 23:42:27 +03:00
unelsson
0cfabd6f3b
Move mapToSource back to constructor
2021-08-22 23:42:27 +03:00
unelsson
b2fe591590
Don't do any storing in the constructor
2021-08-22 23:42:27 +03:00
unelsson
45549da0f5
For most commands, set mOld in redo, not in constructor
2021-08-22 23:42:27 +03:00
unelsson
7801f42005
Don't do mapToSource at executeModify
2021-08-20 22:32:41 +03:00
cc9cii
bd3ef506cd
Empty Pathgrid record is considered as the modder's intention to delete any existing record.
2021-08-19 19:30:01 +10:00
unelsson
298db2ef76
Initialize and check pointer.
2021-08-12 22:31:37 +03:00
unelsson
f1d05a93bf
Get index and model from proxy
2021-08-12 22:28:16 +03:00
psi29a
b770373491
Merge branch 'OpenCS-enforce-str-length' into 'master'
...
OpenCS - Disallow entry of strings longer than the lengths allowed by the file format (#3066 )
See merge request OpenMW/openmw!1088
2021-08-06 21:08:09 +00:00
glassmancody.info
09e03fde2e
refactor and fix wobbly shores
2021-08-04 17:49:57 -07:00
cc9cii
8aee84c46e
Disallow entry of strings longer than the lengths allowed by the file format.
...
It is possible to allow longer strings but that will require an extension in the omwaddon format as well as changes to the reader to handle that extension. Such changes should be a separate MR.
(applied the patch in https://gitlab.com/OpenMW/openmw/-/issues/3066 )
2021-08-04 09:39:18 +10:00
psi29a
9fa7521fc5
Merge branch 'OpenCS-no-charconv' into 'master'
...
OpenCS - Avoid the inclusion of charconv header
See merge request OpenMW/openmw!1087
2021-08-03 23:32:40 +00:00
psi29a
9b7e14ec00
Merge branch 'OpenCS-moved-reference' into 'master'
...
OpenCS - Fix moved reference - Issues #3514 and #4752
See merge request OpenMW/openmw!1051
(cherry picked from commit 2bee171c7990522da33c2667f7d079fa35f4ede0)
36c30f7f Fix for Issue #3514 where moving a reference to another cell is not handled properly.
40327681 Update the changelog.
2021-08-03 23:29:05 +00:00
cc9cii
bf06898a79
Retain the use of std::string_view in the function signature.
2021-08-04 08:23:22 +10:00
cc9cii
99e691fbe3
Avoid the inclusion of <charconv> header due to Ubuntu Bionic (18.04) which as gcc version less than 8.1
...
Partially reverts commit fd67ebde25
2021-08-04 06:47:14 +10:00
psi29a
4b48e62b64
Merge branch 'fixandclean' into 'master'
...
Fix opencs build and remove some clang warnings
See merge request OpenMW/openmw!1078
2021-08-01 12:11:17 +00:00
fredzio
1391194152
Remove unneeded return statement
2021-08-01 13:14:32 +02:00
fredzio
9ba459662d
Remove unneeded std::move
...
[19/199] Building CXX object apps/opencs/CMakeFiles/openmw-cs.dir/model/world/commands.cpp.o
../../../apps/opencs/model/world/commands.cpp:298:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
mOld = std::move(model.getRecord (id).clone());
^
../../../apps/opencs/model/world/commands.cpp:298:12: note: remove std::move call here
mOld = std::move(model.getRecord (id).clone());
^~~~~~~~~~ ~
../../../apps/opencs/model/world/commands.cpp:333:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
mOld = std::move(model.getRecord (id).clone());
^
../../../apps/opencs/model/world/commands.cpp:333:12: note: remove std::move call here
mOld = std::move(model.getRecord (id).clone());
^~~~~~~~~~ ~
2 warnings generated.
2021-08-01 13:14:32 +02:00
fredzio
36e33b0cf2
Add missing override
2021-08-01 13:14:32 +02:00
fredzio
bede1ea1ec
Fix build
2021-08-01 13:14:32 +02:00
psi29a
15d278de55
Merge branch 'opt-out-compose' into 'master'
...
Make it possible to opt out of composing variables
Closes #6186
See merge request OpenMW/openmw!1076
2021-08-01 08:53:52 +00:00
cc9cii
67cad2c515
Fix CSMWorld::InfoCollection::getTopicRange()
returning one too many.
2021-08-01 15:53:00 +10:00
AnyOldName3
4727ae4b3b
Make it possible to opt out of composing variables
2021-08-01 02:47:10 +01:00
psi29a
141095b850
Merge branch 'OpenCS-loading-opt' into 'master'
...
OpenCS loading time improvements
See merge request OpenMW/openmw!1044
2021-07-31 21:27:29 +00:00
cc9cii
33dcd7585a
OpenCS - Jump To Modified
2021-07-24 20:00:25 +00:00
cc9cii
3e466699c8
A better way to plug a potential memory leak in the event of an exception during push_back().
2021-07-24 21:23:03 +10:00
cc9cii
fd67ebde25
Changes based on review comments, including:
...
* replace murmurhash with std::unordered_map
* plug potential leak from unique_ptr release
* replacing some sections with cleaner code
2021-07-24 09:17:48 +10:00
cc9cii
725d689e8a
Call push_back() if inserting to the end of the vector. It seems MSVC may be generating different code compared to insert().
...
(copied the changes from commit SHA-1: 257126ed69
)
2021-07-23 23:17:16 +10:00
cc9cii
44a333b6db
Don't attempt to open files yet to be created.
2021-07-23 21:25:35 +10:00
cc9cii
5c504e4d22
Convert the CellRef record index lookup maps to use integer keys rather than strings.
...
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times.
- std::map is used, but should try others, std::unordered_map or even std::vector
(copied the changes from commit SHA-1: 86945d1912
)
2021-07-23 19:07:56 +10:00
cc9cii
10c6304a1f
Fix typo from commit cfdbd0d471
.
2021-07-23 18:12:09 +10:00
cc9cii
fc2f68a465
Change the loader's top progress bar to show total number of records processed rather than the number of files.
...
(copied the changes from commit SHA-1: ff072441fd
)
2021-07-23 17:34:27 +10:00
cc9cii
5fffcab94f
Performance improvements for loading Info records.
...
- The order of info records with the same topic are maintained in Collection::mRecords
- The index lookup data structure are not ordered. The topic string is hashed. The infos for the topic are simply placed in a vector.
- The index values for appending or inserting a record takes prev/next values (if exist)
- FIXME: prev/next values are not adjusted for adding or removing records
- FIXME: undo after reordering does not reset the modified flag
(copied the changes from commit SHA-1: 06f9922822
)
2021-07-23 16:05:58 +10:00