* 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)
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.
* 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++
Resolves a TODO on that constructor, and one more TODO elsewhere due to
the resulting refactoring.
time_point was implicitly convertible from int. This led to unclear
code. In particular, the item constructor took a time_point and a
quantity, and these two ints appeared adjacent with no obvious way to
see what they meant at call sites.
Make the constructor explicit, so the conversion is no longer implicit.
Update the rest of the code accordingly.
In most cases switched from 0 to calendar::turn_zero, which is
equivalent. In a couple of places, used start_of_cataclysm instead,
when it seemed more appropriate (such as birthday of toilet water).
It's possible there are more cases which should have been something
other than turn_zero.
* Make Character::stat into a standalone enum class
Enables forward declaration
* Remove player centric overload and unecessary include
* Remove player.h dependency from trap.cpp
* Add singleton-like accessors for avatar, map, weather and event_bus
* use accessors to remove includes of game.h
* Initial version of UseNamedPointConstantsCheck
This is intended to convert hand-rolled point constants like
point( 0, 0 ) into point_zero.
* Apply refactoring pass
* Manual fixup of refactored code
Add various manual tweaks to the automatically refactored code where I
think it makes sense.
* Remove some unnecessary initializations
* Make canned meat recipes use the right amount of meat
The amount of meat and the volume of the container did not add up
before this change and now they do.
* Halving chunk of meat volume and updating recipes to match
* Update data/json/items/comestibles/carnivore.json
Co-Authored-By: anothersimulacrum <anothersimulacrum@gmail.com>
* Updating meat cooling unit test
* Add IWYU pragma: keep
* Run IWYU and astyle
* Run IWYU a second time
* Prevent #include <cxxabi.h>
Unclear why IWYU thinks this is needed. It isn't, and it causes
problems on Visual Studio.
* 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.
* set_temperature also sets energy, set product temp
In old system crafted items just reset the temp check without setting the actual temperature.
Not going to try to implement anything fancy for that so crafted items that are not heated up are just set to 20 C which should behave similarly to old system.
Temperature is now calculated with newton's law of cooling. No more using approximation of an approximation.
* Energy and temperature are in 0.00001 J/g and K