diff --git a/common/include/physfsx.h b/common/include/physfsx.h index 5e7e4717e..d5ed4d397 100644 --- a/common/include/physfsx.h +++ b/common/include/physfsx.h @@ -14,9 +14,10 @@ #pragma once #include +#include #include +#include #include -#include #include #include @@ -423,15 +424,7 @@ typedef char file_extension_t[5]; [[nodiscard]] __attribute_nonnull() -int PHYSFSX_checkMatchingExtension(const char *filename, const partial_range_t); - -template -[[nodiscard]] -__attribute_nonnull() -static inline int PHYSFSX_checkMatchingExtension(const std::array &exts, const char *filename) -{ - return PHYSFSX_checkMatchingExtension(filename, exts); -} +int PHYSFSX_checkMatchingExtension(const char *filename, const std::ranges::subrange range); enum class physfs_search_path : int { diff --git a/similar/misc/physfsx.cpp b/similar/misc/physfsx.cpp index 7a78a207d..6bd999dc0 100644 --- a/similar/misc/physfsx.cpp +++ b/similar/misc/physfsx.cpp @@ -71,7 +71,7 @@ char *PHYSFSX_fgets_t::get(const std::span buf, PHYSFS_File *const fp) return cleanup(); } -int PHYSFSX_checkMatchingExtension(const char *filename, const partial_range_t range) +int PHYSFSX_checkMatchingExtension(const char *filename, const std::ranges::subrange range) { const char *ext = strrchr(filename, '.'); if (!ext)