Commit Graph

15 Commits

Author SHA1 Message Date
ad600125df Rewrite HashMapHasherDefault based on type traits - it is now possible to declare a default hashing function for any type.
Remove cross-project includes from `hashfuncs.h`.
Improve hashing function for `Color` (based on values instead of `String`).
Move `Variant` comparison from `hash_map.h` to `dictionary.cpp` (`VariantComparatorDictionary`), where it's used.
Remove now unnecessary `HashableHasher`.
2025-10-05 01:49:11 +02:00
ed836df150 Make conversions from math types to String explicit, to avoid accidental conversions. 2025-06-09 01:58:18 +02:00
ea62170dac Core: Add constexpr constructors/operators to math structs
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
2025-03-17 12:15:31 -05:00
75bc471965 Add is_zero_constructible to denote if a type can be semi-trivially constructed with all 0 bytes.
Optimize `CowData` and `LocalVector` resize for zero constructible types.
Mark several compatible types as `is_zero_constructible`.
2025-03-12 09:49:24 +01:00
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
b9038501db Merge pull request #90582 from Repiteo/core/remove-macro-_NO_DISCARD_
Core: Replace `_NO_DISCARD_` macro with `[[nodiscard]]`
2024-06-25 10:01:39 +02:00
308dbb8c63 [Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
55a4836e5b Core: Replace _NO_DISCARD_ macro with attribute 2024-04-12 16:40:01 -05:00
79ba22a73f Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
491ded1898 Minor typo and docs URL fixes 2023-02-28 13:38:01 +01:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
43722dbcbc Use float literals for float calculations in Color 2022-10-07 11:28:47 -05:00
995b9f94e8 Replace Rect2(i) has_no_area with has_area 2022-09-04 23:03:36 -05:00
e223bad86d Core: Move Vector2i to its own vector2i.h header
Also reduce interdependencies and clean up a bit.
2022-02-04 16:32:21 +01:00
5f56d385b0 Core: Move Rect2i to its own rect2i.h header
And take the opportunity to improve interdependencies a bit with forward
declares where possible.
2022-02-04 14:17:30 +01:00