Increase iterations (1000 -> 1500) and epsilon (0.05 -> 0.06)
for the monster-targeting check_damage_from_test_fire to reduce
flake probability from ~1/350 to ~1/42000.
* get rid of npctalk_var_ prefix for eoc variables
* cleanup after #77055
* deprecate more of type and context
* migrate item vars, make migration happen only once
* doc updates
* migrate u/npc/monster variables
* fix context var migration
* remove `substr( 12 )` in math parser
* move migration to a single function where possible
* no auto
* please clang
* Please clang more
* fix submap load test
* clean up after #77656
* cleanups after #77520
* Test for mon_ prefix
* Replace LIXA_ with mon_
* deal with pseudo monsters
* Check for prefix in vanilla monster during data load
* better cpp
* fix hardcoded ids
---------
Co-authored-by: Fris0uman <fris0uman@users.noreply.github.com>
* Convert integer parsing test to use normal TEST_CASEs
* Rename test name too similar to another
* Test to enforce normalized test names
* Normalize TEST_CASE names (scripted)
Generally speaking, we don't want large functions in headers. They
increase compile time, not just because the function itself is compiled
many times over but also because they need extra headers to be included.
Using a new clang-tidy check (added in the next commit) find all
functions in headers with more than five statements, and move them into
cpp files.
Also, some static functions in cpp files were marked inline. This
serves no real purpose; the compiler will already do a good job of
inlining static functions, so stop that.
Our string_id constants were a mixture of temporaries, locals, and
globals. Pull them all out as globals, for consistency and efficiency.
The efficiency comes from the fact that each string_id instance caches
its respective int_id, and sharing one instance means that value need
not be recomputed.
* Make `weapon` private
* Update tests
* Rebase
* Appley suggestions
* Fix weapon dorping
* fix weapon saving
* Rename to get_wielded_item
* rename to set_wielded_item
* fixes
* Post rebase fixes
* fixes
* fix weapon saving
* fixes
* more rebase and fixes
* Apply suggestions
* post rebase fixes
Catch2 provides a customization point for converting our types to
strings by specializing the StringMaker template.
We have some specializations in stringmaker.h, but this feature was only
working intermittently. I finally figured out that was due to an ODR
violation. The test files that didn't include stringmaker.h were
compiling a different specialization than the ones that did.
Re-jig the test includes so that any file including catch.hpp also
includes stringmaker.h, thereby ensuring that the custom
specializations are used everywhere and there is no ODR violation.
I achieved this by adding a new cata_catch.h header and making all
existing headers include catch.hpp via the new header.
* s/two by four/plank
there are still some translations that refer to "two by" "four" across
two lines, leaving those alone for now because I'm lazy
* fix id in doc/VEHICLES_JSON.md, revert translation changes
* 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++
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.
* Move block_hit(), and associated functions, from player to Character
* Move apply_damage, deal_damage and related functions
* fix
* astyle
* remove excedent slime
* Helper script to run IWYU
* Run IWYU
* Update deprecated headers
* Run IWYU again
* Re-suppress cxxabi.h
This pragma got accidentally removed because it was deemed to be a
comment attached to a #include.
* Remove extra SDL header includes
* Fix ime.cpp headers
Some tweaks to help IWYU not break this file by messing with
platform-specific stuff not relevant on Linux.
* Update game.h
* Move new point.h includes inside #ifdef
* Re-add platform_win.h to mapsharing.cpp
* Apply suggestions from code review
Co-authored-by: ZhilkinSerg <ZhilkinSerg@users.noreply.github.com>
* 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.