Bret Curtis
66a527c3de
Merge pull request #3075 from akortunov/warnfix
...
Fix MSVC's C4244 and C4267 warnings
2021-05-14 21:28:56 +02:00
Petr Mikheev
4a7147e222
Merge branch 'constexpr_esm' into 'master'
...
Use a constexpr for esm cc
See merge request OpenMW/openmw!849
2021-05-13 13:30:01 +00:00
jvoisin
bcd8190516
Fix a crash in aipackage.cpp
2021-05-13 14:19:12 +02:00
jvoisin
89f721fad3
Use a constexpr for esm cc
2021-05-12 22:35:00 +02:00
Andrei Kortunov
963e1b8b3f
Fix MSVC's C4244 warnings
2021-05-12 10:34:40 +04:00
Andrei Kortunov
f9d42ed396
Fix MSVC's C4267 warnings
2021-05-12 10:34:39 +04:00
elsid
b806445a36
Use existing min implementation
2021-05-09 13:58:05 +02:00
psi29a
08e1a8e0fb
Merge branch 'esm_opti' into 'master'
...
Teensy optimisation for esmtool
See merge request OpenMW/openmw!826
2021-05-07 14:21:37 +00:00
jvoisin
8a56ba6aaa
Fix compilation
2021-05-07 13:58:30 +02:00
elsid
fbeccc2908
Apply 1 suggestion(s) to 1 file(s)
2021-05-07 09:28:47 +00:00
jvoisin
e97e4d07dd
Teensy optimisation for esmtool
...
- Use an unordered_set instead of a list to
keep track of skipped records.
- Reduce the number of conditions when parsing 4-letters
records by using a switch-case instead of cascading conditions.
- Add a const
2021-05-06 22:41:20 +02:00
Dobrohotov Alexei
57c372a50e
ESM code cleanup
2021-05-05 22:23:06 +03:00
psi29a
e94181b2b2
Merge branch 'constexpr' into 'master'
...
Sprinkle a couple of constexpr found by VS
See merge request OpenMW/openmw!800
(cherry picked from commit 5e8ea624bc85acebf457592dd10b790124ecf6ef)
5704b2ac Sprinkle a couple of constexpr found by VS
2021-05-04 21:09:20 +00:00
jvoisin
5f65583a3a
Fix a heap overflow in loadpgrd.cpp
2021-04-30 12:04:41 +00:00
Evil Eye
abb120b439
Don't log a warning for reading to the end of the subrecord
2021-04-27 14:57:07 +02:00
Alexei Dobrohotov
add04a4ea0
Merge branch 'fix_esm' into 'master'
...
Fix a read head-buffer-overflow in esm
See merge request OpenMW/openmw!751
2021-04-25 21:56:52 +00:00
jvoisin
032ba1e9a0
Fix the compilation
2021-04-18 13:26:26 +02:00
jvoisin
c0f7e0d585
Use isnan
2021-04-17 20:58:37 +02:00
jvoisin
38316cdaf8
Fix various warnings found by clang
...
- unused alias
- inefficient use of push_back
- exceptions not inheriting from std::exception
- weird use of a comma
- value compared against itself
2021-04-17 19:06:33 +02:00
jvoisin
a35eae3dd1
Fix a read head-buffer-overflow in esm
...
The check forgot to account for the terminal zero.
2021-04-17 15:36:38 +02:00
Evil Eye
80266d435c
Merge branch 'fix_crash' into 'master'
...
Fix an off-by-one in loadscpt
See merge request OpenMW/openmw!728
2021-04-16 18:02:47 +00:00
Andrei Kortunov
016a1d45df
Remove outdated field - remnant from earlier implementation
2021-04-14 10:58:44 +04:00
jvoisin
54adb9cbed
Fix an off-by-one in loadscpt
2021-04-12 12:03:20 +02:00
psi29a
301411c5c5
Merge branch 'esm_variant' into 'master'
...
Use std::variant for ESM::Variant implementation
See merge request OpenMW/openmw!719
2021-04-10 12:53:11 +00:00
Andrei Kortunov
124a33d8a3
Fix uninitialized variables
2021-04-10 10:58:00 +04:00
elsid
8e1c92d9af
Use std::variant for ESM::Variant implementation
2021-04-08 19:39:31 +02:00
elsid
03fc3ec803
Do not allow write variant of string as local variable
...
To be consitent with read where it's not allowed.
2021-04-04 23:09:27 +02:00
Gleb Mazovetskiy
b9c2f6ea1a
Minor cleanup: Remove using namespace std
...
I came across these while trying to figure why MSVC build triggers
https://developercommunity.visualstudio.com/t/error-c2872-byte-ambiguous-symbol/93889
In the end, the issue was not in openmw but in OSG, but it's good to
clean up here anyway.
2021-03-16 19:58:02 +00:00
Andrei Kortunov
4d48c81998
Add move assignment operator and move constructor for the ESM::Variant
2021-03-13 22:28:13 +04:00
Andrei Kortunov
f40e227686
Remove redundant formatting changes
2021-01-26 22:29:41 +04:00
Andrei Kortunov
d12a0fdcb3
Mark only instances from groundcover files as groundcover objects
2021-01-26 22:29:41 +04:00
Andrei Kortunov
14cf0ce1dc
Implement instanced groundcover
2021-01-26 22:29:41 +04:00
Andrei Kortunov
89f3f860ed
Allow to get a rotation vector from ESM::Position
2021-01-13 14:25:25 +04:00
elsid
7b54415c40
Fix reference binding to null
...
/usr/include/c++/10.2.0/bits/stl_vector.h:1046:34: runtime error: reference binding to null pointer of type 'value_type'
#0 0x55e37f50008a in std::vector<char, std::allocator<char> >::operator[](unsigned long) /usr/include/c++/10.2.0/bits/stl_vector.h:1046
#1 0x55e37f50008a in ESM::SavedGame::load(ESM::ESMReader&) /home/elsid/dev/openmw/components/esm/savedgame.cpp:28
#2 0x55e37e726139 in MWState::Character::addSlot(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/character.cpp:31
#3 0x55e37e742b39 in MWState::Character::Character(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/character.cpp:88
#4 0x55e37e7006e1 in MWState::CharacterManager::CharacterManager(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/charactermanager.cpp:25
#5 0x55e37e6d4140 in MWState::StateManager::StateManager(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:90
#6 0x55e37e82595a in OMW::Engine::prepareEngine(Settings::Manager&) /home/elsid/dev/openmw/apps/openmw/engine.cpp:641
#7 0x55e37e8439fd in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:867
#8 0x55e37e782760 in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:289
#9 0x55e37f6483c3 in wrapApplication(int (*)(int, char**), int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/components/debug/debugging.cpp:200
#10 0x55e37ba8e3fe in main /home/elsid/dev/openmw/apps/openmw/main.cpp:301
#11 0x7f013e845151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#12 0x55e37baa0e3d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw+0x6c11e3d)
2021-01-09 22:59:24 +01:00
Andrei Kortunov
8084a336b5
Replace zeroes and nulls by nullptrs
2020-11-29 11:14:07 +04:00
Alexei Dobrohotov
53f91a3aa5
Merge pull request #3018 from akortunov/emplace
...
Use emplace_back instead of push_back
2020-11-01 01:58:56 +03:00
Andrei Kortunov
64ba81ecf2
Fix some issues, found by CoverityScan
2020-10-28 18:02:31 +04:00
Bret Curtis
5a824d0333
components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues
2020-10-22 23:57:53 +02:00
Andrei Kortunov
065ed5138e
Use emplace_back instead of push_back
2020-10-18 10:27:35 +04:00
Andrei Kortunov
8ca3c3b123
Mark overrided methods by override keyword
2020-10-16 22:18:54 +04:00
Assumeru
72549651e0
Rework container resolution ( #3006 )
...
* Rework container resolution
* add optional argument to getCount
* remove now-redundant changes
* undo worldimp changes
* move save-fixing code to InventoryState
* replace Rng instances with Seeds
2020-10-13 17:46:32 +02:00
Andrei Kortunov
822764d0fa
Rework fixed strings handling
2020-10-05 21:52:22 +04:00
Andrei Kortunov
9f1fbd56a3
Fix SummonKey comparison function
2020-09-04 13:45:38 +04:00
Andrei Kortunov
67eace1028
Use struct instead of tuple
2020-08-29 11:24:08 +04:00
Andrei Kortunov
924f634bda
Support for multiple summons with same ID in the single spell
2020-08-28 21:14:54 +04:00
Evil Eye
6ad20ec9c7
Mutate base records when adding/removing spells
2020-07-28 08:33:28 +02:00
Andrei Kortunov
d0fe15b095
Use meaningful names instead of mSkill1 and mSkill2
2020-06-26 11:47:59 +04:00
bzzt lost a hitlab login
26ab176389
profiling
...
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
Andrei Kortunov
d997842f8d
Use FourCC to declare all ESM record names
2020-06-09 10:07:37 +04:00
Bret Curtis
cd97d0c61c
Merge branch 'master' into automove
2020-06-08 11:42:05 +02:00