1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

9019 Commits

Author SHA1 Message Date
Ivan Savenko
d29c9d6445 Fortify CLabel interface to prevent unchecked access 2022-12-19 22:04:50 +02:00
Andrii Danylchenko
87ba221415
Merge pull request #1243 from vcmi/fix-1116
#1116 - fix assertion
2022-12-19 10:24:44 +02:00
Andrii Danylchenko
cf97bf2cfd
Remove unused code 2022-12-18 13:11:02 +02:00
Andrii Danylchenko
1555c51313 fix assertion 2022-12-18 12:29:03 +02:00
Andrii Danylchenko
c55178e876
Merge pull request #1241 from trofi/catch-by-reference
AI/Nullkiller/Goals/ExecuteHeroChain.cpp: catch polymorphic exception…
2022-12-18 09:07:18 +02:00
Sergei Trofimovich
c2c352c6dd AI/Nullkiller/Goals/ExecuteHeroChain.cpp: catch polymorphic exceptions by reference
The suspicious code was detected by `gcc-13` as:

    AI/Nullkiller/Goals/ExecuteHeroChain.cpp: In member function 'virtual void NKAI::Goals::ExecuteHeroChain::accept(NKAI::AIGateway*)':
    AI/Nullkiller/Goals/ExecuteHeroChain.cpp:130:47: warning: catching polymorphic type 'class NKAI::cannotFulfillGoalException' by value [-Wcatch-value=]
      130 |                                         catch(cannotFulfillGoalException)
          |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
    AI/Nullkiller/Goals/ExecuteHeroChain.cpp:176:23: warning: catching polymorphic type 'class NKAI::goalFulfilledException' by value [-Wcatch-value=]
      176 |                 catch(goalFulfilledException)
          |                       ^~~~~~~~~~~~~~~~~~~~~~

Similar to object passing by value and reference passing polymorphic
exceptions by reference likely destroys them when copy-constructed to
a base class. Let's catch them by reference.
2022-12-17 21:50:57 +00:00
Andrii Danylchenko
19105d1cc9
Merge pull request #1234 from Nordsoft91/bump-1.2
Bump version
2022-12-16 20:16:44 +02:00
nordsoft
7b2b3bd065 Bump version 2022-12-16 17:12:36 +04:00
Hennadii Chernyshchyk
eec7d91f2c Remove unused forward declaration 2022-12-15 15:33:30 +04:00
Hennadii Chernyshchyk
8de6c4a704 Fix SharedMemory declaration
Should be under VCMI_LIB_NAMESPACE_BEGIN
2022-12-15 15:33:30 +04:00
Andrii Danylchenko
ee55a21fae
Merge pull request #1190 from Nordsoft91/editor-speedup
Smart invalidation for move/erase/new object [1.2]
2022-12-15 12:23:28 +02:00
Andrii Danylchenko
8c07ddbae0
Merge pull request #1204 from IvanSavenko/single_process_app_upgrade
[1.2] Single process app support for platforms other than ios
2022-12-15 12:22:24 +02:00
Ivan Savenko
155f776ae8
Merge pull request #1172 from IvanSavenko/battleint_refactor
[1.2] Refactoring of BattleInterface class
2022-12-13 21:31:18 +02:00
Ivan Savenko
d94076c618 Fix msvc build 2022-12-13 16:54:49 +02:00
Ivan Savenko
55d0f0ad9f Fixed infinite loop 2022-12-13 15:17:42 +02:00
Ivan Savenko
99e5569ab5 Changes according to review 2022-12-13 15:10:31 +02:00
Ivan Savenko
264f5c91e8 Applied suggestions from review 2022-12-13 13:58:16 +02:00
Ivan Savenko
f97d4c3630 Removed commented-out code 2022-12-12 18:50:14 +02:00
Ivan Savenko
602e52127b Cleaned up forward declarations 2022-12-12 18:26:04 +02:00
Ivan Savenko
d40d5250b7 changes to status bar according to review comments:
- renamed IStatusBar API to more clear names
- removed "locking" of status bar
- added comments for IStatusBar API
- removed dynamic_casts to CGStatusBar, now IStatusBar API is fully
sufficient
2022-12-12 18:23:41 +02:00
Ivan Savenko
1558c28c0a Fix obstacle rendering 2022-12-12 00:05:00 +02:00
Ivan Savenko
c302efd315 Fix crash on accessing not yet created object 2022-12-12 00:04:46 +02:00
Ivan Savenko
ac839ad26a Changes to rest of the code according to review:
- renamed status bar method clearMatching -> clearIfMatching
- renamed class ColorShifterAddMul -> ColorShifterMultiplyAndAdd
- fixed missing return from function
- fixed potential access to deleted object
2022-12-11 23:43:43 +02:00
Ivan Savenko
49a6d056d9 Changes for BattleInterface classes according to code review:
- added documentation comments for classes, members and methods
- added const specifier to methods where applicable
- renamed some methods with more clear name
- removed some commented-out or unused code
2022-12-11 23:16:23 +02:00
Ivan Savenko
7f5e5259c8 Changes to Canvas class according to review:
- renamed CCanvas -> Canvas.cpp
- replaced shared_ptr<Canvas> with Canvas&
- removed getSurface method
2022-12-11 22:09:57 +02:00
Ivan Savenko
c855823528 Renamed files in client/battle to match new names of classes 2022-12-09 13:38:46 +02:00
Ivan Savenko
3f9a0a855e Renamed most of classes in client/battle directory to match current code
style
2022-12-09 13:26:17 +02:00
krs
ed70c69a2b extractToFolder fix with entry.offset is set to 0 2022-12-08 02:52:30 +04:00
krs
35db24a443 Reverted extractToFolder() for texts, to old stand alone version. 2022-12-08 02:52:30 +04:00
Ivan Savenko
f8c67829a1 Restored single-app build to off by default 2022-12-06 22:30:34 +02:00
Ivan Savenko
4e1c8324fe Removed another unused friend declaration 2022-12-06 21:11:41 +02:00
Ivan Savenko
e09f42f487 Reverted launcher change: launcher should use shared version of libvcmi 2022-12-06 21:11:20 +02:00
Ivan Savenko
4e43f5bdc2 Removed dllimport/export from single-app launcher build 2022-12-06 19:39:33 +02:00
Ivan Savenko
e0c8bd5d70 Removed unused friend class reference 2022-12-06 19:38:55 +02:00
Ivan Savenko
fd97b51183 Yet another attempt to fix Windows compile:
when building vcmi_lib statically (or linking against static vcmi_lib)
do not place dllexport/dllimport tags
2022-12-06 18:35:24 +02:00
Ivan Savenko
a06d7ec80e Fix Armaggeddon visual effect 2022-12-06 14:29:31 +02:00
Ivan Savenko
3c037ed620 Fix spellcaster animations 2022-12-06 14:12:13 +02:00
Ivan Savenko
f247a98373 Fix non-siege battles 2022-12-06 14:11:37 +02:00
Ivan Savenko
2c05f588fd Moved CBattleRenderer into a separate file 2022-12-06 13:41:29 +02:00
Ivan Savenko
085abb9e32 Fix compilation on Windows 2022-12-06 12:46:10 +02:00
Nordsoft91
923d4e6e6b
Merge pull request #1205 from krs0/feature/PCX_file_conversion_in_Resource_Extractor_throws_exception_on_IOS_(boost__locale_stuff)
PCX file conversion in Resource Extractor throws exception on IOS (boost::locale stuff)
2022-12-06 04:38:27 +04:00
Ivan Savenko
09ac2421b9 Fix Windows single-app build 2022-12-06 01:53:19 +02:00
Ivan Savenko
2a492261e1 Fix building with cmake older than 3.12 2022-12-06 01:33:00 +02:00
krs
117496cb23 PCX file conversion in Resource Extractor throws exception on IOS (boost::locale stuff) 2022-12-06 00:49:39 +02:00
Ivan Savenko
bc1ba2135d TEST COMMIT, will be reverted after successful Github Action run 2022-12-06 00:02:14 +02:00
Ivan Savenko
fa23965d0b Renamed for consistency BUILD_SINGLE_APP -> ENABLE_SINGLE_APP_BUILD 2022-12-06 00:00:56 +02:00
Ivan Savenko
d2702a8fcd Removed old definitions from Global.h 2022-12-05 23:09:22 +02:00
Ivan Savenko
5e37ad6836 Changes to single-app build
- client version of library is now always called vcmi, like in regular
builds (e.g. libvcmi.so)
- server version of library keeps its separate name
2022-12-05 22:57:43 +02:00
Ivan Savenko
538c6e39f9 Split VCMIDirs::developmentMode to handle data & binaries separately 2022-12-05 22:56:10 +02:00
Ivan Savenko
b8a3bcc8f1 Map editor can be built during single-app build
Editor remains as separate .exe in such build, but it won't break
compilation
2022-12-05 22:28:01 +02:00