void-packages/srcpkgs/wesnoth/patches/000-fix-musl-build.patch

35 lines
2.1 KiB
Diff

From 21e2ec584756c0e7c46ca5037c52a775560931ad Mon Sep 17 00:00:00 2001
From: newfrenchy83 <31768074+newfrenchy83@users.noreply.github.com>
Date: Sat, 30 Mar 2024 13:34:30 +0100
Subject: [PATCH] Fix default argument in matches_if_present filters (#8649)
Source: https://github.com/wesnoth/wesnoth/commit/21e2ec584756c0e7c46ca5037c52a775560931ad
---
src/utils/config_filters.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/utils/config_filters.hpp b/src/utils/config_filters.hpp
index 878042a089e7..04ff6d289811 100644
--- a/src/utils/config_filters.hpp
+++ b/src/utils/config_filters.hpp
@@ -40,8 +40,8 @@ bool bool_matches_if_present(const config& filter, const config& cfg, const std:
*
* Always returns true if the filter puts no restriction on the value of @a cfg[@a attribute].
*/
-bool double_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<double> def = NULL);
-bool int_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<int> def = NULL);
+bool double_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<double> def = std::nullopt);
+bool int_matches_if_present(const config& filter, const config& cfg, const std::string& attribute, std::optional<int> def = std::nullopt);
/**
* Restricts filters to only looking for values that are zero or more.
@@ -62,7 +62,7 @@ bool unsigned_matches_if_present(const config& filter, const config& cfg, const
* The function is named "negative" in case we later want to add a "reciprocal" for the "multiply"/"divide" pair.
*/
bool int_matches_if_present_or_negative(
- const config& filter, const config& cfg, const std::string& attribute, const std::string& opposite, std::optional<int> def = NULL);
+ const config& filter, const config& cfg, const std::string& attribute, const std::string& opposite, std::optional<int> def = std::nullopt);
bool string_matches_if_present(
const config& filter, const config& cfg, const std::string& attribute, const std::string& def);