Remove HAVE_CXX20 macro

We use per-feature standard macros now
This commit is contained in:
Charles Dang 2024-08-27 02:11:41 -04:00
parent 67a491bb9b
commit 3238026ad8
2 changed files with 1 additions and 10 deletions

View File

@ -28,11 +28,6 @@
#error "Compilation with NDEBUG defined isn't supported, Wesnoth depends on asserts."
#endif
// To allow using some optional C++20 features
#if __cplusplus >= 202002L
#define HAVE_CXX20
#endif
#if defined(__clang__)
#endif

View File

@ -79,11 +79,7 @@ class cache_type
public:
bool in_cache(const locator& item) const
{
#ifdef HAVE_CXX20
return content_.contains(item);
#else
return content_.find(item) != content_.end();
#endif
return content_.find(item) != content_.end(); // TODO C++20: use content_.contains()
}
/** Returns a pointer to the cached value, or nullptr if not found. */