diff --git a/lint-tasks.yml b/lint-tasks.yml index 2bba4a90..90572f9a 100644 --- a/lint-tasks.yml +++ b/lint-tasks.yml @@ -127,6 +127,8 @@ tasks: - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/PyQuery.hpp" - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/PySerializer.cpp" - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/PySerializer.hpp" + - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/Query.cpp" + - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/ir/native/Query.hpp" - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/modules" - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/Py_utils.cpp" - "{{.CLP_FFI_PY_CPP_SRC_DIR}}/Py_utils.hpp" diff --git a/src/clp_ffi_py/ir/native/Query.cpp b/src/clp_ffi_py/ir/native/Query.cpp index 6eef4692..ce10388f 100644 --- a/src/clp_ffi_py/ir/native/Query.cpp +++ b/src/clp_ffi_py/ir/native/Query.cpp @@ -10,16 +10,12 @@ auto Query::matches_wildcard_queries(std::string_view log_message) const -> bool if (m_wildcard_queries.empty()) { return true; } - return std::any_of( - m_wildcard_queries.begin(), - m_wildcard_queries.end(), - [&](auto const& wildcard_query) { - return clp::string_utils::wildcard_match_unsafe( - log_message, - wildcard_query.get_wildcard_query(), - wildcard_query.is_case_sensitive() - ); - } - ); + return std::ranges::any_of(m_wildcard_queries, [&](auto const& wildcard_query) { + return clp::string_utils::wildcard_match_unsafe( + log_message, + wildcard_query.get_wildcard_query(), + wildcard_query.is_case_sensitive() + ); + }); } } // namespace clp_ffi_py::ir::native diff --git a/src/clp_ffi_py/ir/native/Query.hpp b/src/clp_ffi_py/ir/native/Query.hpp index 9295b7ed..6189efa7 100644 --- a/src/clp_ffi_py/ir/native/Query.hpp +++ b/src/clp_ffi_py/ir/native/Query.hpp @@ -4,10 +4,11 @@ #include #include #include +#include #include #include -#include +#include #include #include