1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add max() to Span.

Remove `<algorithm>` include from `rendering_device_commons.h`, using `Span` instead.
This commit is contained in:
Lukas Tenbrink
2025-10-07 01:47:17 +02:00
parent c01c7b800d
commit 1fa332cad4
4 changed files with 17 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ class RenderingShaderContainerFormat;
template <typename... RESOURCE_TYPES>
struct VersatileResourceTemplate {
static constexpr size_t RESOURCE_SIZES[] = { sizeof(RESOURCE_TYPES)... };
static constexpr size_t MAX_RESOURCE_SIZE = std::max_element(RESOURCE_SIZES, RESOURCE_SIZES + sizeof...(RESOURCE_TYPES))[0];
static constexpr size_t MAX_RESOURCE_SIZE = Span(RESOURCE_SIZES).max();
uint8_t data[MAX_RESOURCE_SIZE];
template <typename T>