Commit graph

84162 commits

Author SHA1 Message Date
Charles Dang
80fbc3bab0 Fix Windows console not showing initial startup output 2024-08-01 00:50:14 -04:00
Charles Dang
7a665d0959 Config Attribute Value: let compiler handle default special functions (rule of 5) 2024-08-01 00:05:54 -04:00
Charles Dang
0a9d351fe2 Replace filesystem::ends_with with boost::algorithm::ends_with
The former had nothing to do with fs functionality at all.
2024-08-01 00:03:13 -04:00
Charles Dang
2f85001897 GUI2/Group: marked get_active_member_value const 2024-07-31 22:55:04 -04:00
Charles Dang
159998b80c MP: fix ambiguous case of config attribute used as bool
It's honestly not entirely clear what the right behavior is here. The way it is, to_bool is implicitly being invoked, which, given that this is supposed to hold an int, would always return false. And checking the int value doesn't seem to make sense either, since that would only exclude turns=0 (which would be a dumb value, but I'm not sure that's what this is for. So I figured a 'has attribute' check is best.
2024-07-31 22:47:01 -04:00
Charles Dang
18b9bf7c23 AI/Manager: clean up a few constness things 2024-07-31 22:38:23 -04:00
Charles Dang
f3c569a10d AI/Manager: clean up unnecessary uses of this-> 2024-07-31 22:19:28 -04:00
Charles Dang
40a071fbc5 AI/Manager: clean up a nasty case of string concat 2024-07-31 22:11:06 -04:00
Charles Dang
3b1eb6580f Use standard feature check macros instead of the global HAVE_CXX20 flag 2024-07-31 14:45:05 -04:00
Charles Dang
b295364979 Attempt to fix utils::reversed_range 2024-07-31 14:45:04 -04:00
Charles Dang
e0507c1156 Test use of std::string::ends_with 2024-07-31 14:45:03 -04:00
Gunter Labes
8a67ee5101
Demote some messages to debug level 2024-07-31 08:56:31 +02:00
Gunter Labes
7355ee2eb7
Remove trailing whitespace 2024-07-31 08:51:46 +02:00
Charles Dang
fa905a6165 Added some heterogeneous comparison config tests 2024-07-30 22:48:40 -04:00
Charles Dang
e36b675ec4 New config_attribute_value::operator== implementation 2024-07-30 22:48:40 -04:00
Charles Dang
1ba0168eb3 Removed serialization test that relies on deleted ostream operators
These were removed in C++20. See https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2
and https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html#option7
2024-07-30 21:03:43 -04:00
Charles Dang
698bc98ff2 Avoid brace init for visitor classes
Doesn't play nice with boost::static_visitor for c++20...
2024-07-30 21:03:43 -04:00
Charles Dang
d77700f2f2 Use feature check for parenthesized aggregate initialization 2024-07-30 21:03:43 -04:00
Charles Dang
bd819ced00 MP/Connect: move user_defined implementation out of header 2024-07-30 21:03:43 -04:00
Charles Dang
387fa7458e Terrain/Builder: cleanup various struct ctors and use inline initialization
This avoids issues when building with Clang in C++20 mode. It seems in C++20 (possibly as a
result of vector gaining constexpr functionality), the rule about not referencing incomplete
types in a vector is now more strictly enforced.

See also https://www.lukas-barth.net/blog/cpp20-vector-incomplete/
2024-07-30 21:03:43 -04:00
Charles Dang
a4fa20a331 Schema: delete empty dtors in parser and wml_tag 2024-07-30 21:03:43 -04:00
Charles Dang
221b17b9f6 Schema/Tag: clean up constructors, use inline initialization 2024-07-30 21:03:43 -04:00
Charles Dang
712e66f9ef Display Context: move has_team implementation out of header 2024-07-30 21:03:43 -04:00
Charles Dang
a2e50f56c4 WFL: move variant_list ctor implementation out of header 2024-07-30 21:03:43 -04:00
Charles Dang
764c50f21a Color Range: take span to const color_t 2024-07-30 21:03:43 -04:00
Pentarctagon
3cef48fe38
damage ability tests (#9137) 2024-07-30 19:06:38 -05:00
white-haired-uncle
d74b4061fa
improve tooltip placement on sidebar (#8908) 2024-07-30 17:27:27 -05:00
Subhraman Sarkar
64caa4acda
Allow quick reload of gui2 themes (#9117)
* New "Apply" button in preferences dialog that is used to quickly apply the GUI2 theme, no restart needed.
* gui initialization reorganized a bit. gui2::init() now responsible for reading themes from file only. Actual theme switching and activation done by gui2::switch_theme(). preferences dependency removed from gui and moved to caller of gui2::init(). gui2 tests updated accordingly.
2024-07-30 07:59:54 +05:30
pentarctagon
40cca745d0 fix indentation in changelog 2024-07-29 12:55:12 -05:00
Toom
cd5f878eba fix WRN_NG level 2024-07-29 10:50:57 +10:00
Gunter Labes
1f6c935fe1
Declare locally used function static 2024-07-28 22:10:09 +02:00
Pentarctagon
5c3188581b
update CI to Ubuntu 24.04 (#9139) 2024-07-28 13:07:59 -05:00
Gunter Labes
d8f2df16aa
Document translations target 2024-07-28 17:59:28 +02:00
Nils Kneuper
8961008dc1 updated British English translation 2024-07-27 13:38:31 +02:00
Nils Kneuper
c66701cb35 updated Chinese (Simplified) translation 2024-07-27 13:36:55 +02:00
Nils Kneuper
35451c0683 updated Bengali translation 2024-07-27 13:14:15 +02:00
pentarctagon
8a377e58b2 add database setup commands as well 2024-07-26 20:04:40 -05:00
Subhraman Sarkar
ebe4ee9d09
open load map/save map as dialog in correct folders (#9129)
Opens load map/save map as dialogs in the addon's map directory if an addon is selected.
With no addon selected they open in the editor/maps directory.
2024-07-25 14:35:22 +05:30
Subhraman Sarkar
d47466dfc0
titlescreen: make drop cap algorithm utf8 aware (#9122)
* make drop caps utf8 aware and use locale's script font

1. Uses utf8::insert to modify the string so that it works for non-ASCII characters.
2. Use the locale's script font from data/hardwired/fonts.cfg instead of using Oldania always.

* make the algorithm work for multiple start tags in the tip text

* update condition to prevent throwing exception and don't use utf8::size

* adds comment that the tags do not have multibyte characters
2024-07-25 08:40:30 +05:30
gfgtdf
6cb9cbeca8 add .lua files to .editorconfig
we currently use the same indentation style for  lua as for cpp files
2024-07-24 16:04:27 +02:00
Celtic Minstrel
7f3378d00c Use boost::optional only on MacOS and remove has_optional_value 2024-07-23 13:49:16 -04:00
Celtic Minstrel
2679fec5f2 Add utils/optional_fwd to the Xcode project 2024-07-23 09:29:45 -04:00
Celtic Minstrel
f6ae8ab850 Mass replace all std::optional with utils::optional
Also import bad_optional_access into the utils namespace so we can catch the exception when we need to
2024-07-23 09:29:20 -04:00
Celtic Minstrel
ffde1cb21c Use utils::optional instead of std::optional in filesystem 2024-07-23 09:05:53 -04:00
Celtic Minstrel
62d9ebecc2 Revert "Used std::optional directly since we support C++17 now"
This reverts commit 4d54b2a7fd.
2024-07-23 09:03:13 -04:00
Celtic Minstrel
740aadb273 Revert "utils::optional -> std::optional for 8058dab"
This reverts commit 255fc0d450.
2024-07-23 08:47:35 -04:00
Celtic Minstrel
c89c1b4b4a Revert "Revert "color_t: make macOS happy""
This reverts commit 5a77ff92c6.
2024-07-23 08:25:02 -04:00
Celtic Minstrel
ac431ca9dd Revert "Remove macOS compat path for std::variant and std::any"
This reverts commit c2decdfb58.
2024-07-23 08:23:38 -04:00
Oleksii
b372f9e9ae
DM: S18 recall fix (#9118)
* DM S18 recall fix

* Update 18_The_Portal_of_Doom.cfg

* Update sides.cfg
2024-07-23 15:38:58 +10:00
Gunter Labes
e8e078f968
Print locale error message 2024-07-23 07:33:36 +02:00