* Change _ctype.h and __locale to cctype and clocale
* Change _wctype.h to cwctype in game.cpp
* Change __functional_base to functional
* Remove libcxx internal headers
* Remove UNIX system headers
* Fix clang-tidy error with -nostdinc++
The intended purpose of these mutation tests was somewhat obscure, and
the output on failure could be difficult to interpret. This commit aims
to improve them in the following ways:
- Add a new test focused on a simple example with only 3 mutations
- Add explanatory comments to each test, to clarify the intent
- Replace 'auto' variables with explicit types, to aid static analysis
- Reduce the number of unnecessary assertions, to make output cleaner
Use the new clang-tidy check to convert a bunch of declarations to
static.
In a few cases, there were 'secret' dependencies being exposed without
headers. Convert those to work via headers instead.
The mutation_category_trait objects have ids, but they were just
std::strings. Make them be a string_id<mutation_category_trait>
instead.
This is a general move towards type safety, although the specific goal I
wanted to achieve was better validity checking of cata_variants.
Correct the "overmap_sight" mutation value map to be additive, rather
than multiplicative. Include a regression test that failed before this
change, and passes afterward.
Fix#42853
For reasons I do not understand, using "multiplicative" here caused the
"Self-Aware" trait to nullify the overmap sight adjustments from both
the "Scout" and "Topographagnosia" traits.
* Fix missing declarations
Mark functions with no prior declarations as static, and remove the
unused ones.
* Move debug_is_safe_string definition
Put it inside !WIN32 since it's only used there.
A first step towards IWYU support. Doing the sorting first because it
makes reviewing any additions or removals of headers much simpler.
The IWYU order is:
- Associated headers
- Misc system headers
- C++ STL headers
- Other project headers
The biggest change is moving system headers before project headers (they
are usually afterwards in Cata at the moment.
The associated header for a cpp file is the header file which declares
the functions defined in that cpp file. Normally that's the one which
shares the same name (up to extension), and if so IWYU figures it out
automatically.
However, in this project there are many corner cases, so we need to use
IWYU pragma: associated to tell it which header (or, in some cases,
which headers) is the associated header. We are unusual in having
multiple associated headers for some files, which might lead to
discovering some interesting IWYU bugs later, but in theory it is
supported.