summaryrefslogtreecommitdiff
path: root/AK/NeverDestroyed.h
AgeCommit message (Collapse)Author
2022-12-03Everywhere: Run clang-formatLinus Groh
2022-11-26AK: Make it possible to not `using` AK classes into the global namespaceAndreas Kling
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by default, but can be overridden by build flags. This is a step towards integrating Jakt and AK types.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2020-11-22NeverDestroyed: Add testsLenny Maiorani
Problem: - It is difficult to refactor because there are no tests to bind the functionality. - Arguments are not forwarded correctly to the constructor. Solution: - Add tests. - Change constructor to take forwarding references.
2020-09-22AK: Consider long and unsigned long as integral types.asynts
Two things I hate about C++: 1. 'int', 'signed int' and 'unsigned int' are two distinct types while 'char, 'signed char' and 'unsigned char' are *three* distinct types. This is because 'signed int' is an alias for 'int' but 'signed char' can't be an alias for 'char' because on some weird systems 'char' is unsigned. One might think why not do it the other way around, make 'int' an alias for 'signed int' and 'char' an alias for whatever that is on the platform, or make 'char' signed on all platforms. But who am I to ask? 2. 'unsigned long' and 'unsigned long long' are always different types, even if both are 64 bit numbers. This commit fixes a few bugs that coming from this. See Also: 1b3169f405ac9250b65ee3608e2962f51d2d8e3c.
2020-08-27Meta: Force semi-colon after MAKE_AK_NONXXXABLE()Ben Wiederhake
Before, we had about these occurrence counts: COPY: 13 without, 33 with MOVE: 12 without, 28 with Clearly, 'with' was the preferred way. However, this introduced double-semicolons all over the place, and caused some warnings to trigger. This patch *forces* the usage of a semi-colon when calling the macro, by removing the semi-colon within the macro. (And thus also gets rid of the double-semicolon.)
2020-02-16AK: Fixed a typo in NeverDestroyed.h (#1228)Kaif Mavani
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-12-26AK: Add NeverDestroyed<T>, for things that should never be destroyedAndreas Kling
This template allows you to define static globals without having them destroyed on exit.