78260 Commits

Author SHA1 Message Date
Nils Kneuper
601ad5f462 updated French translation 2021-01-23 13:16:33 +01:00
Nils Kneuper
b945d25e11 updated Catalan translation 2021-01-23 13:15:09 +01:00
Charles Dang
8a316fa094 Fixup build
UNUSED wasn't defined here anymore, so this just adds some quick boilerplate to replace it
and that uses the class's private members.
2021-01-23 22:47:01 +11:00
Charles Dang
f8a45f2be9 Removed two unnecessary boost includes 2021-01-23 21:52:04 +11:00
Charles Dang
3ebe14c47b Removed spirit-po MSVC 2013 patch file 2021-01-23 21:49:39 +11:00
Charles Dang
8b0127bc1f Made use of the spirit_po::default_catalog typedef 2021-01-23 21:49:15 +11:00
Charles Dang
7311b19d4d Added utils::reversed_view
This is a wrapper around either std::views::reversed (C++20) or boost::adaptors::reverse (anything else).
2021-01-23 21:38:02 +11:00
Charles Dang
204d3b4254 Cleaned up global.hpp includes 2021-01-23 21:08:00 +11:00
Charles Dang
a04f6d2564 Replaced UNUSED with [[maybe_unused]] where applicable 2021-01-23 20:44:02 +11:00
Charles Dang
b713de3d85 Updated spirit-po from source
Applies (refs to :
* 4a72a9f0ef (we had !=, upstream used >, so I went with the latter)
* 4cf2d589e9 (catalog.hpp only)
* fac4caa4d0

This also fixes builds with /std:c++latest on MSVC. Seems that last commit which fixed things on
GCC9 also fixes thing on MSVC. Not entirely sure why it breaks in C++20 mode where it didn't before,
but potentially something to do with the default constructor and the new concepts stuff.
2021-01-23 20:36:15 +11:00
Charles Dang
a1cb45dc2d Fixed build with /std:c++latest
`requires` is a reserved keyword in C++20 related to the new Concepts stuff, so you can't have a function
named that. Also renamed `conflicts` to `does_conflict` for consistency with the new `does_require`.
2021-01-23 20:17:04 +11:00
Charles Dang
5df29bf9e6 Used [[fallthrough]] directly 2021-01-23 18:26:48 +11:00
Charles Dang
52db6a92fc Removed explicit STDC99 define on MSVC
We compile Lau as C++ code anyway.
2021-01-23 18:23:15 +11:00
Charles Dang
f8e58f0625 VS: specify C17 for C code 2021-01-23 18:20:49 +11:00
Andrey Bienkowski
a8a3bedc46 TSG: Add missing NOTE_DEFENSE_CAP
Three units with movement_type=mounted were missing {NOTE_DEFENSE_CAP}
2021-01-22 20:28:15 +01:00
Charles Dang
b8bf664147 Fixup 2069b70 2021-01-22 16:22:07 +11:00
Charles Dang
2069b70653 Made config::error inherit from std::exception instead of boost::exception
There was once a reason to use the latter (136f42bd4f264c0e933af9fcf6860d2a0a69bdb7, where boost::get_error_info
was used and relied on the error inheriting from boost::exception, but that code is long removed) and now it's
just an unnecessary boost include.
2021-01-22 15:10:14 +11:00
Charles Dang
4512d17c0b Game Conifg Manager: implemented an automatic WML cache file cleaning step
The game keeps track of the version it last cleaned the cache, and if it's less than the current version,
it will perform a cache clean when the game_config_manager is created.
2021-01-22 14:59:39 +11:00
Charles Dang
cca68fcdc0 Fixup f84be32 2021-01-22 14:11:18 +11:00
Charles Dang
4bf5acf3f2 GUI2/Chat Log: marked text area as link-aware (fixes #5485) 2021-01-22 14:08:10 +11:00
Charles Dang
f84be32671 Cleaned up and optimized pango_text::format_links 2021-01-22 14:07:24 +11:00
Charles Dang
e350b50b9a Game Board: used structured bindings 2021-01-22 14:05:53 +11:00
Charles Dang
32850904d3
Merge pull request #5490 from wesnoth/string-view-test
Switch to std::string_view
2021-01-22 13:26:36 +11:00
Charles Dang
c5b1fa9dfd Converted uses of utils::string_view to std::string_view 2021-01-22 11:51:53 +11:00
Charles Dang
c081233d9d Moved byte_string_view typedef, defined it with std::string_view 2021-01-22 11:14:41 +11:00
Charles Dang
a1fdb34ad8 Config: used std::string_view for key type 2021-01-22 10:39:10 +11:00
Charles Dang
2da3018361 Ok CI needs ptr-container again... 2021-01-21 13:13:44 +11:00
Charles Dang
5ab8d1e9d6 Server: converted usecases of optional::value to *
This can be reverted after we support MacOS 10.14 as minimum and we can use optional::value again
2021-01-21 13:13:29 +11:00
Charles Dang
73133f261c Fixed build on windows 2021-01-21 13:07:31 +11:00
Charles Dang
255fc0d450 utils::optional -> std::optional for 8058dab 2021-01-21 12:56:10 +11:00
Sergey Popov
8058daba84
Make wesnothd use iterators instead of socket_ptrs to keep track of players (#5413) 2021-01-21 12:51:26 +11:00
Charles Dang
51511e582e Boost I do not understand you 2021-01-21 12:03:47 +11:00
Charles Dang
939f2b3c8a Reported part of 601c10cadfe14953c28e3ac9f21416d7299d1f09 that was causing a crash
Need to investigate this further but we want the game playable in the meantime...
2021-01-21 09:56:16 +11:00
nemaara
780a08016e
Merge pull request #5471 from hexagonrecursion/httt-side
Add side=1 in httt_utils.cfg to appease wmllint
2021-01-20 14:26:37 -05:00
Andrey Bienkowski
361a10241a Fix wmllint error: double space after sentence end 2021-01-20 16:59:09 +01:00
Andrey Bienkowski
f7c5b9c80e LOW: Don't forget to undefine local macros
Fix preprocessor warning:
warning preprocessor: Redefining macro LEAVE_BEHIND_L3 without explicit #undef at campaigns/Legend_of_Wesmere/scenarios/chapter4/13_News_from_the_Front.cfg:105
    included from campaigns/Legend_of_Wesmere/_main.cfg:18
    included from _main.cfg:38
previously defined at campaigns/Legend_of_Wesmere/scenarios/chapter3/09_Bounty_Hunters.cfg:240
    included from campaigns/Legend_of_Wesmere/_main.cfg:17
    included from _main.cfg:38
2021-01-20 15:24:34 +01:00
Charles Dang
a8fa01117a Merge branch 'master' of github.com:wesnoth/wesnoth into master 2021-01-21 00:03:14 +11:00
Charles Dang
6391969fa6 Attempt to fixup 601c10c 2021-01-21 00:02:53 +11:00
Andrey Bienkowski
5b7865e36f wmllint: fix textdomain errors
1. Ibanovic wants all #textdomain declrations in line 1: c10cf2b68b6

2. Several files were missing an explicit textdomain declaration.
Three of them actually have translated strings that defaulted to "wesnoth" textdomain:
- data/campaigns/World_Conquest/resources/data/training.cfg
- data/campaigns/World_Conquest/era/campaign/heroes.cfg
- data/campaigns/World_Conquest/scenarios/WC_II_scenario.cfg
2021-01-20 14:00:11 +01:00
Charles Dang
42fa1aa3b5 Cleaned up vcpkg package install list
We no longer need ptr-container or thread.
2021-01-20 21:12:36 +11:00
Charles Dang
601c10cadf Refactored out last uses of boost::ptr_vector
The cases in whiteboard/mapbuilder.hpp needed to be vectors of unique_ptrs since their objects have
deleted copy constructors.
2021-01-20 21:01:54 +11:00
Charles Dang
c0f26a4787 Made boost variant path wrappers take boost::variant explicitly 2021-01-20 15:23:13 +11:00
Charles Dang
5b572d91ac Don't think we actually need this trailing return type 2021-01-20 15:12:02 +11:00
Charles Dang
6c6e0995d3 Added const overload of utils::get_if for the boost path 2021-01-20 15:11:28 +11:00
Charles Dang
3b2df07533 Removed unnecessary make_get_ability_value_visitor function 2021-01-20 14:53:55 +11:00
Charles Dang
f061eaa6e4 Removed two unnecessary includes
general.hpp was accidentally added in e31b327
2021-01-20 14:34:10 +11:00
Charles Dang
e31b327a90 Converted config_attribute_value to use utils::variant
All visitors that are used with apply_visitor have had their boost::static_visitor inheritance
made conditional as well.
2021-01-20 14:23:46 +11:00
Charles Dang
c5b2298f10 AI: cleaned up use of utils::variant
- Got rid of code duplication
- Used visitors over index checks + get
2021-01-20 11:42:52 +11:00
Andrey Bienkowski
22ab2eca92 HTTT: add wmllint: recognize Kalenz Delfador Konrad Li'sar
wmllint tries to detect errors such as a scenario referencing the unit by id before it is introduced by via [recall], [unit] etc.
The definition of "before" wmllint wants to check is chronological: "does an event that introduces a unit happen before an event that references it?",
but the current implementation cheats by simply checking if the definition textually precedes the reference.

22_Return_to_Wesnoth contains two prestart events. The first prestart event defines an event that triggers on turn 4. The second prestart event introduces Kalenz, Delfador and Li'sar.
I could merge the prestart events and reorder the code to avoid the wmllint error, but since it does not actually make the code easier to read I chose a less disruptive option of simply adding "wmllint: recognize".
2021-01-19 10:00:05 -06:00
Andrey Bienkowski
6d53a2ae7e HTTT: add wmllint: recognize Simyr
wmllint tries to detect errors such as a scenario author forgetting to introduce a unit via [recall], [unit] etc and then referencing the unit by id.

Simyr is added to your recall list if you beat 02_Blackwater_Port on HARD by killing the orc leader.

In this instance the scenario author not automatically recalling Simyr is clearly intentional.
2021-01-19 09:57:30 -06:00