Skip to content

Commit

Permalink
alternative fix build with musl libc
Browse files Browse the repository at this point in the history
Due to my confusion between NULL and std::nullopt, a compilation error was introduced.
@iFoundSilentHouse would this suit you better?
  • Loading branch information
newfrenchy83 committed Mar 30, 2024
1 parent 423481d commit bc063ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/config_filters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
Expand Down

0 comments on commit bc063ab

Please sign in to comment.