mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-15 22:12:20 +00:00
ChessEngine: Don't call non-constexpr sqrt
in a constexpr intiializer
GCC likely has a builtin intrinsic that evaluates the operation at compile-time, even if the `LibM` is not declared as constexpr. Clang, however, does not like it, and it failed to compile this code.
This commit is contained in:
parent
44b6f402ae
commit
6f6b1b3ea1
Notes:
sideshowbarker
2024-07-18 10:05:28 +09:00
Author: https://github.com/BertalanD
Commit: 6f6b1b3ea1
Pull-request: https://github.com/SerenityOS/serenity/pull/8470
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/gunnarbeutner ✅
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ public:
|
|||
private:
|
||||
// While static parameters are less configurable, they don't take up any
|
||||
// memory in the tree, which I believe to be a worthy tradeoff.
|
||||
static constexpr double s_exploration_parameter { sqrt(2) };
|
||||
static constexpr double s_exploration_parameter { M_SQRT2 };
|
||||
// FIXME: Optimize simulations enough for use.
|
||||
static constexpr EvalMethod s_eval_method { EvalMethod::Heuristic };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue